Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
zhaokaiyao@91isoft.com
2021-11-09 10:58:55 +08:00
@@ -4,25 +4,22 @@
<div class="search-area">
<div class="left">
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form" >
<el-form-item label="国家/地区" class="search-item search-item-last">
<el-select
v-model="sarSarAccessEOSearch.country"
placeholder="请选择"
filterable
>
<el-option
v-for="item in countryOptions"
:value="item.value"
:key="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="清单名称" class="search-item search-item-last">
<el-form-item label="标准编号/政策编号:" class="search-item search-item-last">
<el-input
v-model="sarSarAccessEOSearch.ListName"
placeholder="请输入清单名称"
v-model="sarSarAccessEOSearch.lawId"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="标准名称/政策名称:" class="search-item search-item-last">
<el-input
v-model="sarSarAccessEOSearch.lawName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="产品类型:" class="search-item search-item-last">
<el-input
v-model="sarSarAccessEOSearch.productType"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
@@ -49,15 +46,13 @@
type="primary"
class="common-button-primary add-button"
size="mini"
@click="openModal(null,'addOpt')"
v-btn-permission="'J2YEFN9MH4KWW5HMR2QH'"
@click="showAddModel(1, null)"
><i class="el-icon-plus"></i>新增</el-button>
<el-button
class="common-button-default delete-button"
:loading="delLoading"
size="mini"
@click="deleteSarAccess('demore',null)"
v-btn-permission="'WPNW79T3DNUZPJFNMHGP'"
><i class="iconfont">&#xe61b;</i>批量删除</el-button>
</div>
<div class="container">
@@ -78,64 +73,42 @@
align="center">
</el-table-column>
<el-table-column
prop="countryArea"
label="国家/地区"
prop="lawId"
width="250"
label="标准编号/政策编号"
align="center">
</el-table-column>
<el-table-column
prop="detailedListName"
label="清单名称"
prop="lawName"
label="标准名称/政策名称"
align="center"
width="260px"
width="300px"
>
</el-table-column>
<el-table-column
prop="detailedListState"
label="清单状态"
prop="productType"
label="产品类型"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.state === '1'">未发布</span>
<span v-if="scope.row.state === '2'">已发布</span>
</template>
</el-table-column>
<el-table-column
prop="detailedListVesion"
label="清单版本"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.detailedListVesion != null && scope.row.detailedListVesion !== ''">V{{ scope.row.detailedListVesion }}</span>
</template>
</el-table-column>
<el-table-column
prop="applicationScope"
label="适用领域"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.applicationScope != null && scope.row.applicationScope !== ''">V{{ scope.row.applicationScope }}</span>
</template>
</el-table-column>
<el-table-column
prop="updateTime"
label="更新时间"
prop="implTime"
sortable
label="实施时间"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '' }}</div>
</template>
</el-table-column>
<el-table-column
prop="updatePeople"
label="更新人"
prop="implRequire"
label="实施要求"
align="center">
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<el-table-column label="操作" min-width="50" align="center">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'HYY8NGY2RYT3VEDRSK5V'">编辑</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="'X9HP9YQL2BRKBFCDMZQT'">删除</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -145,6 +118,155 @@
<loading :loading="loading">数据获取中</loading>
<pagination :page="sarSarAccessEOSearch.page" :total="sarAccessListTotal" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<!-- 编辑抽屉-->
<el-drawer
:title="attributeTitle"
:wrapperClosable="false"
:visible.sync="showInfoModal"
size="800px"
:styles="styles"
:close="cancelModel"
>
<div class="demo-drawer-content">
<el-form
ref="attributeEO"
:model="attributeEO"
:rules="attributeEOFormRules"
class="label-input-form"
label-width="130px"
v-if="showInfoModal"
>
<el-form-item
label="标准编号/政策编号"
prop="lawId"
class="add-form-item"
>
<el-input
style="width: 45%"
v-model.trim="attributeEO.lawId"
placeholder="请输入标准编号/政策编号"
clearable
/>
<!-- :disabled="this.addOrEdit !== 'add'"-->
<el-button type="primary" size="mini" @click="">手动查找</el-button>
</el-form-item>
<el-form-item
label="标准名称/政策名称"
prop="lawName"
class="add-form-item"
>
<el-input
v-model.trim="attributeEO.lawName"
placeholder="请输入标准名称/政策名称"
clearable
/>
</el-form-item>
<el-form-item
label="产品类型"
prop="productType"
class="add-form-item"
>
<el-select
placeholder="请选择产品类型"
v-model="attributeEO.productType"
filterable
>
<el-option
v-for="item in attrTypeOptions"
:value="item.value"
:key="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label="实施时间"
prop="implTime"
class="add-form-item"
>
<el-date-picker
v-model="attributeEO.implTime"
type="date"
placeholder="请选择实施时间">
</el-date-picker>
</el-form-item>
<el-form-item
label="实施要求"
prop="implRequire"
class="add-form-item"
>
<el-select
placeholder="请选择实施要求"
v-model="attributeEO.implRequire"
filterable
>
<el-option
v-for="item in attrTypeOptions"
:value="item.value"
:key="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item-->
<!-- label="是否关联其他类别"-->
<!-- title="是否关联其他类别"-->
<!-- prop="isRelate"-->
<!-- class="add-form-item"-->
<!-- >-->
<!-- <el-select-->
<!-- placeholder="请选择类别"-->
<!-- v-model="attributeEO.isRelate"-->
<!-- filterable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in isRelateOptions"-->
<!-- :value="item.value"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item-->
<!-- label="关联类别"-->
<!-- prop="relateDicId"-->
<!-- v-if="attributeEO.isRelate === '0'"-->
<!-- class="add-form-item"-->
<!-- >-->
<!-- <el-select-->
<!-- v-model="attributeEO.relateDicId"-->
<!-- placeholder="请选择类别"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="opt in relateDicIdOptions"-->
<!-- :value="opt.value"-->
<!-- :key="opt.value"-->
<!-- :label="opt.label"-->
<!-- >{{ opt.label }}</el-option-->
<!-- >-->
<!-- </el-select>-->
<!-- </el-form-item>-->
</el-form>
</div>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button
type="primary"
class="common-button-primary"
size="mini"
:loading="submitLoading"
icon="el-icon-check"
@click="saveInfo"
>提交</el-button
>
<el-button
size="mini"
icon="el-icon-close"
class="common-button-default"
@click="cancelModel"
>取消</el-button
>
</div>
</el-drawer>
</div>
</template>
@@ -153,14 +275,54 @@ export default {
name: "listTracking",
data () {
return {
submitLoading: false,
attrTypeOptions: [
{ label: '下拉选项', value: 'SEL_OPTION' },
{ label: '树形结构', value: 'TREE' }
],
addOrEdit: '',
attributeEOFormRules: {
lawId: [
{ required: true, message: '标准编号/政策编号不能为空', trigger: 'blur' },
],
lawName: [
{ required: true, message: '标准名称/政策名称不能为空', trigger: 'blur' },
],
productType: [
{ required: true, message: '产品类型不能为空', trigger: 'change' }
],
implTime: [
{ required: true, message: '实施日期不能为空', trigger: 'change' }
],
implRequire: [
{ required: true, message: '实施要求不能为空', trigger: 'change' }
],
},
attributeEO: {
id: '',
lawId: '',
lawName: '',
productType: '',
implTime: '',
implRequire: '',
},
styles: {
height: 'calc(100% - 55px)',
overflow: 'auto',
paddingBottom: '53px',
position: 'static'
},
attributeTitle: '',
showInfoModal: false,
searching: false,
total: 0,
page: 1,
rows: 10,
// 查询相关参数
sarSarAccessEOSearch: {
ListName: '',
country: '',
lawId: '',
lawName: '',
productType: '',
accessContent: '',
energyKind: '',
applyArctic: '',
@@ -173,6 +335,7 @@ export default {
sarAccessListTotal: 0,
loading: false,
selectedList: [],
selectedString: '',
// 新增、编辑 准入信息字段
sarAccessEO: {
country: '',
@@ -183,18 +346,6 @@ export default {
},
drawerPage: 1, // 当前抽屉分页的页码
drawerTotal: 0, // 抽屉分页的总条数
sarAccessEORules: {
region: [
{required: true, message: '区域不能为空', trigger: 'change'}
],
country: [
{required: true, message: '国家不能为空', trigger: 'change'}
],
accessContent: [
{required: true, message: '表格名称不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '表格名称不能超过100个字符', trigger: 'blur'}
]
},
countryOptions: [],
drawerCountryOptions: [], // 准入信息 国家下拉框
drawerCountryTwoOptions: [], // 数据搜索-多属性搜索国家下拉框
@@ -247,11 +398,153 @@ export default {
}
},
methods: {
saveInfo () {
this.$refs['attributeEO'].validate((valid) => {
if (valid) {
if (this.addOrEdit === 'add') {
this.submitLoading = true
this.$http.putData(
'/sarIssueTrack/issueTrack',
this.attributeEO,
{
_this: this,
loading: 'roleDataLoading'
},
(res) => {
if (res.ok) {
this.submitLoading = false
this.showInfoModal = false
this.searchSarAccessBtn()
this.getAttrByPage()
this.cancelModel()
// this.showInfoModal = false
} else {
this.submitLoading = false
}
}
)
} else {
this.$http.postData(
'sarIssueTrack/issueTrack',
this.attributeEO,
{
_this: this,
loading: 'roleDataLoading'
},
(res) => {
if (res.ok) {
this.submitLoading = false
this.showInfoModal = false
this.searchSarAccessBtn()
this.getAttrByPage()
this.cancelModel()
this.showInfoModal = false
} else {
this.submitLoading = false
}
}
)
}
}
})
},
cancelModel () {
this.$nextTick(() => {
this.$refs['attributeEO'].resetFields()
this.attributeEO = {
id: '',
lawId: '',
lawName: '',
productType: '',
implTime: '',
implRequire: '',
}
})
this.showInfoModal = false
},
showAddModel (oprState, row) {
this.oprState = oprState
if (this.oprState === 1) {
this.addOrEdit = 'add'
this.attributeTitle = '新增'
this.getDictionarySelList(null)
this.$nextTick(() => {
this.attributeEO = {
id: '',
lawId: '',
lawName: '',
productType: '',
implTime: '',
implRequire: '',
}
this.$refs['attributeEO'].resetFields()
})
this.showInfoModal = true
} else if (this.oprState === 2) {
this.addOrEdit = 'edit'
this.attributeTitle = '编辑'
this.getDictionarySelList(null)
this.attributeEO = JSON.parse(JSON.stringify(row))
this.showInfoModal = true
}
},
getDictionarySelList (id) {
this.$http.get(
'sys/dictionary/getDictionarySelList',
{
id: id
},
{
_this: this
},
(res) => {
this.relateDicIdOptions = res.data
},
(e) => {}
)
},
// 删除
deleteSarAccess(flag, id) {
if (flag === 'delOne') {
this.selectedList = [];
this.selectedList[0] = id;
}
if (this.selectedList.length === 0) {
this.$message.warning('请选择要删除的数据')
} else {
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: '确定',
confirmButtonClass: 'common-button-primary',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
for (let i = 0; i < this.selectedList.length; i++) {
this.selectedString += this.selectedList[i]+","
}
let selectedString = this.selectedString.substring(0,this.selectedString.length-1)
this.$http.delete("sarIssueTrack/issueTrack", {selectedString},{
_this: this,
loading: 'roleDataLoading'
}, (res) => {
this.selectedList = [];
this.$message.success('删除成功')
this.searchSarAccessBtn()
this.getAttrByPage()
this.cancelModel()
}, e => {
});
}).catch(() => {
// 取消删除,清空选择
this.selectedList = [];
})
}
},
// 更多
handleCommand (command) {
console.log('536',command)
switch (command[1]) {
case '编辑':
this.editTable(command[0])
this.showAddModel(2, command[0])
break
case '删除':
this.deleteSarAccess('delOne', command[0].id)
@@ -265,7 +558,24 @@ export default {
},
//分页查询
searchSarAccess (advanceSearch) {
console.log('准备开始分页查询')
this.$http.get("/sarIssueTrack/issueTrack", {
page: 1,
pageSize: this.pageSize,
...this.sarSarAccessEOSearch,
sortKey: 2
}, {
_this: this
}, res => {
let arr = res.data;
console.log('分页查询中',arr)
this.sarAccessListDatas = arr
this.tableLoading = false
this.sarSarAccessEOSearch.page = 1
this.sarAccessListTotal = res.data.total
}, e => {
});
console.log('分页查询完毕')
},
pageChange (page) {
this.sarSarAccessEOSearch.page = page
@@ -277,7 +587,9 @@ export default {
},
clearSearch (search = true) {
// search 字段是为了处理高级查询时清空字段用的
this.sarSarAccessEOSearch.country = ''
this.sarSarAccessEOSearch.lawId = ''
this.sarSarAccessEOSearch.lawName = ''
this.sarSarAccessEOSearch.productType = ''
this.sarSarAccessEOSearch.accessContent = ''
this.sarSarAccessEOSearch.applyArctic = ''
this.sarSarAccessEOSearch.energyKind = ''
@@ -285,15 +597,6 @@ export default {
this.sarSarAccessEOSearch.page = 1
search && this.searchSarAccess()
},
// 新增相关
openModal (row, optType) {
this.$router.push({
name: 'ListOfStandardsAndRegulationsDetails'
})
},
// 删除
deleteSarAccess (flag, id) {
},
// 表格选择框
selectOne (alldata, nowdata) {
this.selectedList = []
@@ -301,16 +604,26 @@ export default {
this.selectedList.push(alldata[i]['id'])
}
},
// 点击 table编辑按钮 事件
editTable (item) {
sessionStorage.setItem('accessRow', JSON.stringify(item))
this.$router.push({
name: 'ListOfStandardsAndRegulationsDetails',
query: {
id: item.id
}
})
},
// // 点击 table编辑按钮 事件
// editTable (item) {
// sessionStorage.setItem('accessRow', JSON.stringify(item))
// this.$router.push({
// name: 'ListOfStandardsAndRegulationsDetails',
// query: {
// id: item.id
// }
// })
// },
// async handleTableEdit (params) {
// await this.queryDisplayLocationList(params.sarType)
// // this.$refs['attributeEO'] && this.$refs['attributeEO'].resetFields()
// this.addOrEdit = 'edit'
// this.attributeTitle = '编辑'
// this.showInfoModal = true
// this.$nextTick(() => {
// this.attributeEO = JSON.parse(JSON.stringify(params))
// })
// },
},
mounted () {
// 分页查询数据