|
@@ -119,7 +119,7 @@
|
|
<td>{{item.pyzby}}</td>
|
|
<td>{{item.pyzby}}</td>
|
|
<td align="center">
|
|
<td align="center">
|
|
<span style="color:#409EFF;;cursor: pointer;margin-right: 5px;" @click="editClick(item)" v-if="item.show===false">编辑</span>
|
|
<span style="color:#409EFF;;cursor: pointer;margin-right: 5px;" @click="editClick(item)" v-if="item.show===false">编辑</span>
|
|
- <span style="color:green;;cursor: pointer;margin-right: 5px;" @click="saveClick(item)" v-else>保存</span>
|
|
|
|
|
|
+ <span style="color:green;;cursor: pointer;margin-right: 5px;" @click="saveClick(item)" v-else v-loading="isEditLoaing">保存</span>
|
|
|
|
|
|
<span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key,item.id,item)">删除</span>
|
|
<span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key,item.id,item)">删除</span>
|
|
|
|
|
|
@@ -142,7 +142,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
-import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,updateDetail} from "@/api/manager/AdjustForm";
|
|
|
|
|
|
+import {getRoleInfoByParentId, getRoleType, getSigList, saveSig,updateDetail,getSignDetail} from "@/api/manager/AdjustForm";
|
|
import {findPfxType} from "@/api/certificate/list";
|
|
import {findPfxType} from "@/api/certificate/list";
|
|
|
|
|
|
|
|
|
|
@@ -173,7 +173,8 @@ export default {
|
|
isCansave:false,
|
|
isCansave:false,
|
|
colKey:'',
|
|
colKey:'',
|
|
colName:'',
|
|
colName:'',
|
|
- sigRoleName:''
|
|
|
|
|
|
+ sigRoleName:'',
|
|
|
|
+ isEditLoaing:false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -352,7 +353,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if(isadd){
|
|
if(isadd){
|
|
- data.sh=false
|
|
|
|
|
|
+ data.show=false
|
|
this.setsignaTable.push(data);
|
|
this.setsignaTable.push(data);
|
|
}
|
|
}
|
|
}catch (e){
|
|
}catch (e){
|
|
@@ -361,6 +362,9 @@ export default {
|
|
},
|
|
},
|
|
async editClick (item){
|
|
async editClick (item){
|
|
console.log(item,'item');
|
|
console.log(item,'item');
|
|
|
|
+ this.setsignaTable.forEach((ele)=>{
|
|
|
|
+ ele.show=false
|
|
|
|
+ })
|
|
item.show=true
|
|
item.show=true
|
|
console.log(this.htmlData1,'htmlData1');
|
|
console.log(this.htmlData1,'htmlData1');
|
|
const {data: res} = await getSignDetail({id: item.id})
|
|
const {data: res} = await getSignDetail({id: item.id})
|
|
@@ -419,42 +423,46 @@ export default {
|
|
saveClick(item){
|
|
saveClick(item){
|
|
this.editRoleInfo()
|
|
this.editRoleInfo()
|
|
},
|
|
},
|
|
- async editRoleInfo(){
|
|
|
|
- this.isEditLoaing=true
|
|
|
|
- console.log(this.htmlData1,'this.htmlData.dqid1111111');
|
|
|
|
- let obj={}
|
|
|
|
- obj.colKey=this.colKey
|
|
|
|
- obj.colName=this.colName
|
|
|
|
- obj.sigRoleName=this.sigRoleName
|
|
|
|
- obj.tabId=this.pkeyId1
|
|
|
|
- obj.excelId=this.excelId
|
|
|
|
- obj.type=this.signType
|
|
|
|
- obj.pyzbx=this.pyzbx
|
|
|
|
- obj.pyzby=this.pyzby
|
|
|
|
- obj.id=this.signId
|
|
|
|
- obj.isDeleted=this.isDeleted
|
|
|
|
- if(this.signType==2){
|
|
|
|
- obj.parentRoleId=this.radio
|
|
|
|
- console.log(this.sigRoleId,'this.sigRoleId');
|
|
|
|
- obj.sigRoleId=this.sigRoleId
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- obj.sigRoleId=this.signInfo
|
|
|
|
- }
|
|
|
|
|
|
+ async editRoleInfo(){
|
|
|
|
|
|
- const {data: res} = await updateDetail(obj)
|
|
|
|
- this.isEditLoaing=false
|
|
|
|
-
|
|
|
|
- if(res.code==200){
|
|
|
|
- this.$message({
|
|
|
|
- type: "success",
|
|
|
|
- message: "操作成功"
|
|
|
|
- });
|
|
|
|
- this.getSingInfo()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ console.log(this.htmlData1,'this.htmlData.dqid1111111');
|
|
|
|
+ let obj={}
|
|
|
|
+ obj.colKey=this.colKey
|
|
|
|
+ obj.colName=this.colName
|
|
|
|
+ obj.sigRoleName=this.sigRoleName
|
|
|
|
+ obj.tabId=this.pkeyId1
|
|
|
|
+ obj.excelId=this.excelId
|
|
|
|
+ obj.type=this.signType
|
|
|
|
+ obj.pyzbx=this.pyzbx
|
|
|
|
+ obj.pyzby=this.pyzby
|
|
|
|
+ obj.id=this.signId
|
|
|
|
+ obj.isDeleted=this.isDeleted
|
|
|
|
+ if(this.signType==2){
|
|
|
|
+ obj.parentRoleId=this.radio
|
|
|
|
+ console.log(this.sigRoleId,'this.sigRoleId');
|
|
|
|
+ obj.sigRoleId=this.sigRoleId
|
|
|
|
|
|
- },
|
|
|
|
|
|
+ }else{
|
|
|
|
+ obj.sigRoleId=this.signInfo
|
|
|
|
+ }
|
|
|
|
+ let arr=this.setsignaTable
|
|
|
|
+ arr.forEach((ele)=>{
|
|
|
|
+ if(obj.id==ele.id){
|
|
|
|
+ ele.colKey=obj.colKey
|
|
|
|
+ ele.excelId=obj.excelId
|
|
|
|
+ ele.pyzbx=obj.pyzbx
|
|
|
|
+ ele.pyzby=obj.pyzby
|
|
|
|
+ ele.sigRoleId=obj.sigRoleId
|
|
|
|
+ ele.sigRoleName=obj.sigRoleName
|
|
|
|
+ ele.type=obj.type
|
|
|
|
+ ele.tabId=obj.tabId
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.setsignaTable=arr
|
|
|
|
+ this.saveSingInfo()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
async deleteTableSig (key) {//删除数据
|
|
async deleteTableSig (key) {//删除数据
|
|
this.setsignaTable.splice(key,1);
|
|
this.setsignaTable.splice(key,1);
|
|
this.isCansave=true
|
|
this.isCansave=true
|