|
|
@@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="home_wrapper"> |
|
|
|
<div class="header_main"> |
|
|
|
修改{{form.otherType=='1'?'合同':form.otherType=='2'?'党务':form.otherType=='3'?'政务':form.otherType=='4'?'产交':''}}公开 |
|
|
|
{{operation==='update'?'修改':'复制'}}{{form.otherType=='1'?'合同':form.otherType=='2'?'党务':form.otherType=='3'?'政务':form.otherType=='4'?'产交':''}}公开 |
|
|
|
<div class="return_btn" @click="onClickLeft"></div> |
|
|
|
<div class="add_btn"></div> |
|
|
|
</div> |
|
|
@@ -128,7 +128,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {commonUpload, otherPublicDetail, otherEdit} from "@/api/sunVillage_info/fixedAssets"; |
|
|
|
import {commonUpload, otherPublicDetail, otherEdit, otherCopy} from "@/api/sunVillage_info/fixedAssets"; |
|
|
|
import Cookies from "js-cookie"; |
|
|
|
import request from '@/utils/request' |
|
|
|
export default { |
|
|
@@ -155,6 +155,8 @@ |
|
|
|
}, |
|
|
|
openFile2:[], |
|
|
|
openPic2:[], |
|
|
|
// 操作类型:update或copy |
|
|
|
operation: '', |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
@@ -162,6 +164,7 @@ |
|
|
|
this.otherGkTypeOptions = response.data; |
|
|
|
}); |
|
|
|
this.type = this.$route.query.type; |
|
|
|
this.operation = this.$route.query.operation; |
|
|
|
this.queryParams.bookId = Cookies.get('bookId'); |
|
|
|
this.queryParams.deptId = Cookies.get('deptId'); |
|
|
|
this.queryParams.id = this.$route.query.id; |
|
|
@@ -208,14 +211,26 @@ |
|
|
|
that.form.openFile = that.openFile2.join(',') |
|
|
|
that.form.openPic = that.openPic2.join(',') |
|
|
|
this.form.deptName = Cookies.get('deptName'); |
|
|
|
otherEdit(that.form).then((r1) => { |
|
|
|
if (r1.code == 200){ |
|
|
|
that.$notify({ type: 'success', message: '修改成功' }); |
|
|
|
setTimeout(function(){ |
|
|
|
history.back(-1); |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (that.operation === 'update') { |
|
|
|
otherEdit(that.form).then((r1) => { |
|
|
|
if (r1.code == 200){ |
|
|
|
that.$notify({ type: 'success', message: '修改成功' }); |
|
|
|
setTimeout(function(){ |
|
|
|
history.back(-1); |
|
|
|
},1000) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else if (that.operation === 'copy') { |
|
|
|
that.form.id = null; |
|
|
|
otherCopy(that.form).then(res => { |
|
|
|
if (res.code === 200) { |
|
|
|
that.$notify({ type: 'success', message: '复制成功'}); |
|
|
|
setTimeout(function(){ |
|
|
|
history.back(-1); |
|
|
|
},1000) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
onConfirmOpenNy(data){ |
|
|
|
this.form.openAt = this.format(data,'yyyy-MM-dd'); |
|
|
|