|
|
@@ -8,6 +8,7 @@
|
|
|
v-model="form"
|
|
|
v-model:page="page"
|
|
|
:before-open="beforeOpen"
|
|
|
+ @row-update="rowUpdate"
|
|
|
@row-del="rowDel"
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
@@ -86,7 +87,8 @@ export default {
|
|
|
menuWidth: 180,
|
|
|
size: 'mini',
|
|
|
addBtn: false,
|
|
|
- editBtn: false,
|
|
|
+ editBtn: true,
|
|
|
+ editBtnText: '编辑文号',
|
|
|
viewBtn: false,
|
|
|
delBtn: true,
|
|
|
columnBtn: false,
|
|
|
@@ -97,20 +99,24 @@ export default {
|
|
|
label: '文件名称',
|
|
|
prop: 'fileName',
|
|
|
fixed: true,
|
|
|
- width: 400
|
|
|
+ width: 400,
|
|
|
+ editDisplay: false
|
|
|
},
|
|
|
{
|
|
|
label: '文号',
|
|
|
- prop: 'docNumber'
|
|
|
+ prop: 'docNumber',
|
|
|
+ span: 16
|
|
|
},
|
|
|
{
|
|
|
label: '上传人',
|
|
|
prop: 'createUserName',
|
|
|
- width: 120
|
|
|
+ width: 120,
|
|
|
+ editDisplay: false
|
|
|
},
|
|
|
{
|
|
|
label: '上传时间',
|
|
|
- prop: 'createDate'
|
|
|
+ prop: 'createDate',
|
|
|
+ editDisplay: false
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -122,7 +128,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getDic(this.industry.value)
|
|
|
+ this.getDic(this.industry.value)
|
|
|
},
|
|
|
methods: {
|
|
|
getDic(code) {
|
|
|
@@ -149,6 +155,32 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ beforeOpen(done, type) {
|
|
|
+ if (type === 'edit') {
|
|
|
+ done()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ console.log(row)
|
|
|
+ loading()
|
|
|
+ this.$api.common
|
|
|
+ .fileUpdate({ id: row.bladeFileId, copyNumber: row.docNumber })
|
|
|
+ .then(
|
|
|
+ res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ done(row)
|
|
|
+ this.onLoad()
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ window.console.log(error)
|
|
|
+ loading()
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
rowDel(row, index, done) {
|
|
|
this.$confirm('确定将选择数据删除?', {
|
|
|
type: 'warning'
|