标准清单数据列表清空按钮,新增、编辑页的删除

This commit is contained in:
shen_yan_pu
2021-07-29 16:59:48 +08:00
parent 94954879fc
commit 9cff5a5070
10 changed files with 190 additions and 218 deletions
+4 -34
View File
@@ -51,20 +51,12 @@
prop="showNumber"
label="标准号/政策号"
align="center">
<template slot-scope="scope">
<div v-if=" scope.row.splitStatus === '0'">{{ scope.row.standNumSplit }}</div>
<div v-else>{{ scope.row.showNumber }}</div>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称/政策名称"
show-overflow-tooltip
align="center">
<template slot-scope="scope">
<span v-if=" scope.row.splitStatus === '0'">{{ scope.row.standNameSplit }}</span>
<span v-else>{{ scope.row.standName }}</span>
</template>
</el-table-column>
<el-table-column
prop="fileTypeShow"
@@ -77,20 +69,14 @@
show-overflow-tooltip
align="center">
</el-table-column>
<el-table-column
prop="splitStatus"
label="拆分状态"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.splitStatus == '0' ? '编辑中' : (scope.row.splitStatus == '1' ? '审核中' : '已完成' +
'') }}</div>
</template>
</el-table-column>
<el-table-column
prop="creationTime"
label="拆分时间"
sortable
align="center">
<template slot-scope="scope">
<span>{{ scope.row.creationTime ? $moment(scope.row.creationTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="result"
@@ -102,28 +88,12 @@
<el-tag type="danger" size="small" v-else>失败</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<el-table-column label="操作" align="center" width="50">
<template slot-scope="scope">
<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="''">查看</el-dropdown-item>
<!-- <el-dropdown-item-->
<!-- v-if="scope.row.collectBtn"-->
<!-- :command="[scope.row, '收藏']"-->
<!-- v-btn-permission="''"-->
<!-- >-->
<!-- 收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item-->
<!-- v-else-->
<!-- :command="[scope.row, '取消收藏']"-->
<!-- v-btn-permission="''"-->
<!-- >-->
<!-- 取消收藏-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.row, '分享']" v-btn-permission="''">分享</el-dropdown-item>-->
<!-- <el-dropdown-item :command="[scope.row, '关联']">关联</el-dropdown-item>-->
<el-dropdown-item :command="[scope.row, '删除']" v-btn-permission="''">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -2245,15 +2245,7 @@ export default {
})
},
jurisdictionCheck() {
if (this.jurisdiction === '0') {
this.$message.warning('审核中,不可操作')
return false
} else if (this.jurisdiction === '1') {
this.$message.warning('编辑中,不可操作')
return false
} else {
return true
}
return true
}
},
props: {},
+153 -153
View File
@@ -291,158 +291,158 @@ export default {
label: "关联文件",
},
],
// standRecoColumn: [
// {
// type: 'selection',
// width: 60,
// align: 'center'
// },
// {
// title: '序号',
// type: 'index',
// align: 'center'
// },
// {
// title: '资料类型',
// key: 'fileType',
// align: 'center',
// render: (h, params) => {
// let texts
// if (params.row.fileType === '1') {
// texts = '国内标准法规'
// } else if (params.row.fileType === '2') {
// texts = '海外标准法规'
// } else if (params.row.fileType === '3') {
// texts = '政策'
// } else if (params.row.fileType === '4') {
// texts = '企业标准'
// } else {
// texts = '标准'
// }
// return h('div', {
// class: {
// 'text-overflow-hidden': true
// },
// attrs: {
// title: texts
// }
// }, texts)
// }
// },
// {
// title: '标准号/政策号',
// key: 'standNumber',
// align: 'center'
// },
// {
// title: '标准名称/政策名称',
// key: 'standName',
// align: 'center'
// },
// {
// title: '文本状态',
// key: 'fileStatus',
// align: 'center',
// render: (h, params) => {
// let texts
// if (params.row.fileType === 'STAND_FILE') {
// texts = '标准文本'
// } else if (params.row.fileType === 'DRAFT_FILE') {
// texts = '草案'
// } else if (params.row.fileType === 'OPINION_FILE') {
// texts = '征求意见稿'
// } else if (params.row.fileType === 'SENT_SCREEN_FILE') {
// texts = '送审稿'
// } else if (params.row.fileType === 'APPROVAL_FILE') {
// texts = '报批稿'
// } else if (params.row.fileType === 'RELEVANCE_FILE') {
// texts = '关联文件'
// }
// return h('div', {
// class: {
// 'text-overflow-hidden': true
// },
// attrs: {
// title: texts
// }
// }, texts)
// }
// },
// {
// title: '转换结果',
// key: 'resultContent',
// align: 'center'
// },
// {
// title: '消耗时间',
// key: 'spendTime',
// align: 'center'
// },
// {
// title: '操作',
// key: 'action',
// width: 200,
// align: 'center',
// render: (h, params) => {
// return h('div', [
// h('Button', {
// props: {
// type: 'primary',
// size: 'small'
// },
// style: {
// marginRight: '5px'
// },
// on: {
// click: () => {
// this.downloadFile(params.row)
// }
// }
// }, '获取文件'),
// h('Button', {
// props: {
// type: 'warning',
// size: 'small'
// },
// style: {
// marginRight: '5px'
// },
// on: {
// click: () => {
// this.editOcrRecord(params.row)
// }
// }
// }, '编辑'),
// h('Dropdown', {
// props: {
// trigger: 'click'
// },
// on: {
// 'on-click': (value) => {}
// }
// }, [
// h('Button', {
// props: {
// type: 'primary',
// size: 'small'
// }
// }, '更多'),
// h('DropdownMenu', {
// slot: 'list'
// },
// this.dropdownItems.map(function (type) {
// return h('DropdownItem', {
// props: {
// name: type.val
// }
// }, type.val)
// })
// )
// ])
// ])
// }
// }
// ],
/* standRecoColumn: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: '序号',
type: 'index',
align: 'center'
},
{
title: '资料类型',
key: 'fileType',
align: 'center',
render: (h, params) => {
let texts
if (params.row.fileType === '1') {
texts = '国内标准法规'
} else if (params.row.fileType === '2') {
texts = '海外标准法规'
} else if (params.row.fileType === '3') {
texts = '政策'
} else if (params.row.fileType === '4') {
texts = '企业标准'
} else {
texts = '标准'
}
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: texts
}
}, texts)
}
},
{
title: '标准号/政策号',
key: 'standNumber',
align: 'center'
},
{
title: '标准名称/政策名称',
key: 'standName',
align: 'center'
},
{
title: '文本状态',
key: 'fileStatus',
align: 'center',
render: (h, params) => {
let texts
if (params.row.fileType === 'STAND_FILE') {
texts = '标准文本'
} else if (params.row.fileType === 'DRAFT_FILE') {
texts = '草案'
} else if (params.row.fileType === 'OPINION_FILE') {
texts = '征求意见稿'
} else if (params.row.fileType === 'SENT_SCREEN_FILE') {
texts = '送审稿'
} else if (params.row.fileType === 'APPROVAL_FILE') {
texts = '报批稿'
} else if (params.row.fileType === 'RELEVANCE_FILE') {
texts = '关联文件'
}
return h('div', {
class: {
'text-overflow-hidden': true
},
attrs: {
title: texts
}
}, texts)
}
},
{
title: '转换结果',
key: 'resultContent',
align: 'center'
},
{
title: '消耗时间',
key: 'spendTime',
align: 'center'
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center',
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.downloadFile(params.row)
}
}
}, '获取文件'),
h('Button', {
props: {
type: 'warning',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.editOcrRecord(params.row)
}
}
}, '编辑'),
h('Dropdown', {
props: {
trigger: 'click'
},
on: {
'on-click': (value) => {}
}
}, [
h('Button', {
props: {
type: 'primary',
size: 'small'
}
}, '更多'),
h('DropdownMenu', {
slot: 'list'
},
this.dropdownItems.map(function (type) {
return h('DropdownItem', {
props: {
name: type.val
}
}, type.val)
})
)
])
])
}
}
],*/
modalType: "",
standRecoList: [],
selectTableData: [],
@@ -759,7 +759,7 @@ export default {
(res) => {
if (res.ok) {
this.standRecoList = res.data.list;
this.total = res.data.count;
this.total = res.data.list.length;
}
},
e => {}
@@ -267,16 +267,16 @@ export default {
},
pageChange(page) {
this.sarSarAccessEOSearch.page = page;
this.searchSarAccess();
// this.searchSarAccess();
},
pageSizeChange(pageSize) {
this.sarSarAccessEOSearch.pageSize = this.$store.getters.userInfo.configContent;
this.searchSarAccess();
// this.searchSarAccess();
},
clearSearch() {
this.sarSarAccessEOSearch.countryArea = ''
this.sarSarAccessEOSearch.detailedListName = ''
this.searchSarAccess();
// this.searchSarAccess();
},
// 新增相关
openModal(row, optType) {
@@ -283,16 +283,16 @@ export default {
},
pageChange(page) {
this.sarSarAccessEOSearch.page = page;
this.searchSarAccess();
// this.searchSarAccess();
},
pageSizeChange(pageSize) {
this.sarSarAccessEOSearch.pageSize = this.$store.getters.userInfo.configContent;
this.searchSarAccess();
// this.searchSarAccess();
},
clearSearch() {
this.sarSarAccessEOSearch.detailedList = ''
this.sarSarAccessEOSearch.detailedListName = ''
this.searchSarAccess();
// this.searchSarAccess();
},
// 新增相关
openModal(row, optType) {
@@ -283,17 +283,17 @@ export default {
},
pageChange(page) {
this.sarSarAccessEOSearch.page = page;
this.searchSarAccess();
// this.searchSarAccess();
},
pageSizeChange(pageSize) {
this.sarSarAccessEOSearch.pageSize = this.$store.getters.userInfo.configContent;
this.searchSarAccess();
// this.searchSarAccess();
},
//清空
clearSearch() {
this.sarSarAccessEOSearch.projectName = ''
this.sarSarAccessEOSearch.detailedListName = ''
this.searchSarAccess()
// this.searchSarAccess()
},
// 新增相关
@@ -1176,6 +1176,7 @@ export default {
// this.$refs.accessTypeSelect.clearSelection()
this.$refs.entryTable.clearSelection()
this.$refs.searchTable.clearSelection()
this.$message.warning('请勿添加重复数据')
} else{
this.sarAccessInfoList.push(item)
// this.$refs.accessTypeSelect.clearSelection()
@@ -1183,7 +1184,6 @@ export default {
this.$refs.searchTable.clearSelection()
}
})
this.$message.warning('请勿添加重复数据')
} else {
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
}
@@ -1295,17 +1295,17 @@ export default {
for (let i = 0; i < this.sarAccessInfoList.length; i++) {
rowlist.push(this.sarAccessInfoList[i].id)
if (this.sarAccessInfoList[i].putTime === null) {
rowlist1.push(this.sarAccessInfoList[i].putTime = '')
rowlist1.push(this.sarAccessInfoList[i].putTime = '-')
}else {
rowlist1.push(this.sarAccessInfoList[i].putTime.toString())
}
if (this.sarAccessInfoList[i].xcxssrqgj === null) {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '')
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
}else {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
}
if (this.sarAccessInfoList[i].zccssrqgj === null) {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '')
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
}else {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
}
@@ -381,7 +381,7 @@ export default {
heightShow: true,
dataLoading: false,
standardForm: {
zrbm: '',
standNumber: "",
standName: "",
responseUnit: "",
@@ -389,6 +389,10 @@ export default {
Size: this.$store.getters.userInfo.configContent
},
standardFormList: {
zrbm: '',
typeApplicable: '',
nylx: '',
sycpx: '',
standNumber: '',
standName: '',
responseUnit: '',
@@ -493,8 +497,14 @@ export default {
},
// 重置搜索
resetSelect() {
this.standardForm.zrbm = ''
this.standardForm.standName = ''
this.standardForm.responseUnit = ''
this.standardFormList.standName = ''
this.standardFormList.typeApplicable = ''
this.standardFormList.nylx = ''
this.standardFormList.zrbm = ''
this.standardFormList.sycpx = ''
this.selectInfobyAccid()
},
exportStandard() {
@@ -1145,6 +1145,7 @@ export default {
// this.$refs.accessTypeSelect.clearSelection()
this.$refs.entryTable.clearSelection()
this.$refs.searchTable.clearSelection()
this.$message.warning('请勿添加重复数据')
} else{
this.sarAccessInfoList.push(item)
// this.$refs.accessTypeSelect.clearSelection()
@@ -1152,7 +1153,6 @@ export default {
this.$refs.searchTable.clearSelection()
}
})
this.$message.warning('请勿添加重复数据')
this.selectedAccInfoSearchList = []
this.$refs.entryTable.clearSelection()
this.$refs.searchTable.clearSelection()
@@ -1264,17 +1264,17 @@ export default {
for (let i = 0; i < this.sarAccessInfoList.length; i++) {
rowlist.push(this.sarAccessInfoList[i].id)
if (this.sarAccessInfoList[i].putTime === null) {
rowlist1.push(this.sarAccessInfoList[i].putTime = '')
rowlist1.push(this.sarAccessInfoList[i].putTime = '-')
}else {
rowlist1.push(this.sarAccessInfoList[i].putTime.toString())
}
if (this.sarAccessInfoList[i].xcxssrqgj === null) {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '')
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
}else {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
}
if (this.sarAccessInfoList[i].zccssrqgj === null) {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '')
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
}else {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
}
@@ -1144,6 +1144,7 @@ export default {
// this.$refs.accessTypeSelect.clearSelection()
this.$refs.entryTable.clearSelection()
this.$refs.searchTable.clearSelection()
this.$message.warning('请勿添加重复数据')
} else{
this.sarAccessInfoList.push(item)
// this.$refs.accessTypeSelect.clearSelection()
@@ -1151,7 +1152,6 @@ export default {
this.$refs.searchTable.clearSelection()
}
})
this.$message.warning('请勿添加重复数据')
this.selectedAccInfoSearchList = []
this.$refs.entryTable.clearSelection()
this.$refs.searchTable.clearSelection()
@@ -1263,17 +1263,17 @@ export default {
for (let i = 0; i < this.sarAccessInfoList.length; i++) {
rowlist.push(this.sarAccessInfoList[i].id)
if (this.sarAccessInfoList[i].putTime === null) {
rowlist1.push(this.sarAccessInfoList[i].putTime = '')
rowlist1.push(this.sarAccessInfoList[i].putTime = '-')
}else {
rowlist1.push(this.sarAccessInfoList[i].putTime.toString())
}
if (this.sarAccessInfoList[i].xcxssrqgj === null) {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '')
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
}else {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
}
if (this.sarAccessInfoList[i].zccssrqgj === null) {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '')
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
}else {
rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
}