Browse Source

公开信息复制

rongxin_prod
QI_YUJIE 1 year ago
parent
commit
fd5c9ff895
4 changed files with 51 additions and 13 deletions
  1. +9
    -0
      src/api/sunVillage_info/fixedAssets.js
  2. BIN
      src/assets/images/sunVillage_info/list_icon_copy.png
  3. +17
    -3
      src/views/sunVillage_info/list_contract.vue
  4. +25
    -10
      src/views/sunVillage_info/list_contract_edit.vue

+ 9
- 0
src/api/sunVillage_info/fixedAssets.js View File

@@ -94,6 +94,15 @@ export function otherEdit(data) {
}) })
} }


// 复制公开信息
export function otherCopy(data) {
return request({
url: '/subcontract/other/copy',
method: 'post',
data: data
});
}

// 查询合同信息列表 // 查询合同信息列表
export function contractionList(query) { export function contractionList(query) {
return request({ return request({


BIN
src/assets/images/sunVillage_info/list_icon_copy.png View File

Before After
Width: 200  |  Height: 200  |  Size: 4.2 KiB

+ 17
- 3
src/views/sunVillage_info/list_contract.vue View File

@@ -41,7 +41,10 @@
</div> </div>
<div class="operation" v-show="showBtn"> <div class="operation" v-show="showBtn">
<!-- delete 删除 edit编辑 view查看 list榜单 --> <!-- delete 删除 edit编辑 view查看 list榜单 -->
<div class="opera_btn edit" @click="goEdit(item.id)">
<div class="opera_btn edit" @click="goEdit(item.id, 'update')">
<i class="icon "></i>
</div>
<div class="opera_btn copy" @click="goEdit(item.id, 'copy')">
<i class="icon "></i> <i class="icon "></i>
</div> </div>
<div class="opera_btn delete" @click="goRemove(item.id,index)"> <div class="opera_btn delete" @click="goRemove(item.id,index)">
@@ -176,8 +179,8 @@
goDetail(id){ goDetail(id){
this.$router.push({path:'/sunVillage_info/list_contract_detail',query: {id:id,type:this.$route.query.typeX,showBtn:this.showBtn}}) this.$router.push({path:'/sunVillage_info/list_contract_detail',query: {id:id,type:this.$route.query.typeX,showBtn:this.showBtn}})
}, },
goEdit(id){
this.$router.push({path:'/sunVillage_info/list_contract_edit',query: {id:id,type:this.$route.query.typeX}})
goEdit(id, operation){
this.$router.push({path:'/sunVillage_info/list_contract_edit',query: {id:id,type:this.$route.query.typeX,operation: operation}})
}, },
goRanking(id,time){ goRanking(id,time){
this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}}) this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}})
@@ -413,6 +416,17 @@
display: block; display: block;
} }
} }
&.copy{
background: #79cf13;
margin-left: 10PX;
.icon {
width: 25px;
height: 25px;
background: url('../../assets/images/sunVillage_info/list_icon_copy.png') no-repeat;
background-size: 100% 100%;
display: block;
}
}
} }
} }
} }


+ 25
- 10
src/views/sunVillage_info/list_contract_edit.vue View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="home_wrapper"> <div class="home_wrapper">
<div class="header_main"> <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="return_btn" @click="onClickLeft"></div>
<div class="add_btn"></div> <div class="add_btn"></div>
</div> </div>
@@ -128,7 +128,7 @@
</template> </template>


<script> <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 Cookies from "js-cookie";
import request from '@/utils/request' import request from '@/utils/request'
export default { export default {
@@ -155,6 +155,8 @@
}, },
openFile2:[], openFile2:[],
openPic2:[], openPic2:[],
// 操作类型:update或copy
operation: '',
}; };
}, },
created() { created() {
@@ -162,6 +164,7 @@
this.otherGkTypeOptions = response.data; this.otherGkTypeOptions = response.data;
}); });
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.operation = this.$route.query.operation;
this.queryParams.bookId = Cookies.get('bookId'); this.queryParams.bookId = Cookies.get('bookId');
this.queryParams.deptId = Cookies.get('deptId'); this.queryParams.deptId = Cookies.get('deptId');
this.queryParams.id = this.$route.query.id; this.queryParams.id = this.$route.query.id;
@@ -208,14 +211,26 @@
that.form.openFile = that.openFile2.join(',') that.form.openFile = that.openFile2.join(',')
that.form.openPic = that.openPic2.join(',') that.form.openPic = that.openPic2.join(',')
this.form.deptName = Cookies.get('deptName'); 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){ onConfirmOpenNy(data){
this.form.openAt = this.format(data,'yyyy-MM-dd'); this.form.openAt = this.format(data,'yyyy-MM-dd');


Loading…
Cancel
Save