Selaa lähdekoodia

广告设计及素材库按钮权限修改2

wangguangping 3 vuotta sitten
vanhempi
commit
8ad8677283

+ 16 - 17
src/pages/main/terminal/advcheck.vue

@@ -27,7 +27,7 @@
                         <template slot-scope="scope">
                             <el-button size="mini" type="primary" @click="dialogCheck(scope.row,1)">查看</el-button>
                             <!--<el-button size="mini" type="danger" v-if="scope.row.sts==3"-->
-                            <el-button size="mini" type="danger" v-if="advstatus == 0 && (userInfo.loginName != scope.row.opName || scope.row.sts==0)"
+                            <el-button size="mini" type="danger" v-if="advstatus == 0 && scope.row.isBtnShow  && scope.row.sts=='0'"
                                 @click="dialogCheck(scope.row,2)">审核</el-button>
                             <el-button v-if="userInfo.loginName == scope.row.opName&&scope.row.sts=='3'" size="mini"
                                 type="primary" @click="advSure(scope.row)">归档
@@ -114,7 +114,8 @@
                 advtype: '',
                 dgid: '',
                 singleTable: {},
-                shParam:{}
+                shParam:{},
+                // isBtnShow: false,
             }
         },
         methods: {
@@ -136,19 +137,21 @@
                     },
                     data: param,
                 }).then((res) => {
-                    this.tableData = res.data.data;
+                    //this.tableData = res.data.data;
+                    let data = res.data.data;
                     this.total = res.data.totalRecord;
                     this.loading = false;
-					if(this.advstatus!=0){
-						this.tableData.forEach(item => {
-						    this.getSts(item);
+                    if(this.advstatus==0){
+						data.forEach(item => {
+                            item.isBtnShow = false;
+                            this.getSts(item)
 						});
 					}
+                    this.tableData = data;
                 });
             },
-			getSts(v){
-                // console.log(v);
-				this.$http({
+		    async getSts(v){
+				await this.$http({
 				    url: '/bpm/api/taskInit',
 				    method: "post",
 				    headers: {
@@ -160,16 +163,16 @@
 				    },
 				}).then((res) => {
                     this.shParam = res.data;
-                    console.log(this.shParam);
 				    if(res.data.taskName == '需求部门'){
-                        v.sts = '1'
+                        v.sts = '3'
                         return
                     }
                     if(res.data.assigneeNo == this.userInfo.loginNo){
-                        v.sts = '3'
+                        v.sts = '0'
+                        v.isBtnShow = true;
                         return
-
                     }
+            
 				});
 			},
             // 分页
@@ -200,8 +203,6 @@
                 let _this = this;
                 this.dialogStatusc = true;
                 this.dgid = v.id;
-                // this.singleTable = v;
-                // console.log(v, this.tableData);
                 this.getSts(v);
             },
             dialogCli(v) {
@@ -228,7 +229,6 @@
                     this.shParam.params.terminalRes = JSON.stringify(Object.assign(JSON.parse(this.shParam.params.terminalRes) , gdParam))
                     
                     let param = this.shParam
-                    // console.log(param);
 
                     this.$http({
                         // url: "/market/cadv/mkConfirmAdv",
@@ -297,7 +297,6 @@
         },
         mounted() {
             this.userInfo = JSON.parse(window.sessionStorage.userInfo);
-            // console.log(this.userInfo)
             this.advstatus = this.$route.query.type;
             this.getList({}, 1);
             this.ctrlbtn();

+ 0 - 2
src/pages/main/terminal/components/advert.vue

@@ -263,13 +263,11 @@
                         v.price = item.supplier[i].price
                     }
                 }
-                console.log(v,item);
                 v.cho=v.cho+' '+(v.price*(v.num||1))+'元';
             },
             numChange(v){
                 if(!v.cho)return;
                 v.cho = v.cho.split(' ')[0]+' '+(v.price*v.num)+'元';
-                console.log(v);
             },
             //处理申请
             dialogCheck() {