Kaynağa Gözat

修改测试计划图表

plg 1 ay önce
ebeveyn
işleme
04e7ece437

BIN
src/assets/img/table/accredit.png


+ 48 - 13
src/views/manage/channelInfo/invite.vue

@@ -52,7 +52,7 @@
 
       <div class="table-content">
         <el-table
-         height="100%"
+          height="100%"
           :data="tableData"
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
@@ -68,10 +68,16 @@
             width=""
           >
           </el-table-column>
-          <el-table-column prop="createTime" label="创建时间"  :show-overflow-tooltip="true" align="center" width="">
+          <el-table-column
+            prop="createTime"
+            label="创建时间"
+            :show-overflow-tooltip="true"
+            align="center"
+            width=""
+          >
           </el-table-column>
           <el-table-column
-          :show-overflow-tooltip="true"
+            :show-overflow-tooltip="true"
             prop="planEndTime"
             label="结束时间"
             align="center"
@@ -109,11 +115,19 @@
                 <div
                   class="detail_button"
                   v-show="scope.row.planStatus == '1'"
-                  @click="resetPlan(false, scope.row)"
+                  @click="resetPlan('1', scope.row)"
                 >
                   <img src="../../../assets/img/table/xiafa.png" />
                   <span> 下发 </span>
                 </div>
+                <div
+                  class="detail_button"
+                  v-show="scope.row.planStatus == '3' && userInfo.roleType == '5'&&scope.rowenable!=1"
+                  @click="resetPlan('3', scope.row)"
+                >
+                  <img src="../../../assets/img/table/accredit.png" />
+                  <span> 授权 </span>
+                </div>
                 <!-- <div class="detail_button" @click="userOp(scope.row)">
                   <img src="../../../assets/img/table/people.png" />
                   <span> 人员配置 </span>
@@ -125,7 +139,7 @@
                 <div
                   class="detail_button"
                   v-show="scope.row.planStatus == '1'"
-                  @click="resetPlan(true, scope.row)"
+                  @click="resetPlan('2', scope.row)"
                 >
                   <img src="../../../assets/img/table/delete.png" />
                   <span> 删除 </span>
@@ -207,10 +221,12 @@
     >
       <div slot="title">
         <div class="demo-ruleForm">
-          <p v-show="!isDelete" class="dig_title">下发计划</p>
-          <p v-show="isDelete" class="dig_title">删除计划</p>
-          <p v-show="!isDelete">将下发{{ opPlanName }}计划吗</p>
-          <p v-show="isDelete">确认将删除{{ opPlanName }}计划?</p>
+          <p v-show="isDelete == '1'" class="dig_title">下发计划</p>
+          <p v-show="isDelete == '2'" class="dig_title">删除计划</p>
+          <p v-show="isDelete == '3'" class="dig_title">授权</p>
+          <p v-show="isDelete == '1'">将下发{{ opPlanName }}计划吗?</p>
+          <p v-show="isDelete == '2'">确认将删除{{ opPlanName }}计划?</p>
+          <p v-show="isDelete == '3'">确认将授权{{ opPlanName }}计划的报告允许下载吗?</p>
           <div class="dig_button">
             <el-button type="info" round @click="cancle()">取消</el-button>
             <!-- <el-button type="success" round @click="submitForm('ruleForm')"
@@ -399,19 +415,35 @@ export default {
     //提交文本
     submitCom() {
       //判断当前是否是
-      if (this.isDelete) {
+      if (this.isDelete == "2") {
         this.deletePlan();
         //调用删除方法
-      } else {
+      } else if (this.isDelete == "1") {
         this.resetFun();
         // 调用重置密码方法
+      }else if(this.isDelete == "3"){
+        //调用授权 方法进行授权
+        this.accreditFun();
       }
     },
+    accreditFun(){
+      this.$http.get(`/plan/empowerPlan?id=${this.opPlanId}`, {}, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.resetVisible = false;
+          this.$message.success("授权成功");
+          this.searchTarget();
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
     //性别---
     planStatusFun(val) {
       let planStatus = val.planStatus;
       if (planStatus == "1") {
-        return "未开始";
+        return `<div style="color:red">未开始</div>`;
+        // return "未开始";
       } else if (planStatus == "2") {
         return "进行中";
       } else if (planStatus == "3") {
@@ -493,6 +525,9 @@ export default {
       }
     },
     resetPlan(flag, val) {
+      //下发----flag为1
+      //删除----flag为2
+      //授权----flag为3
       this.isDelete = flag;
       this.resetVisible = true;
       this.opPlanId = val.id;
@@ -675,7 +710,7 @@ export default {
 }
 
 .user_out_sub {
-  padding:20px 0px;
+  padding: 20px 0px;
   flex: 1;
   text-align: center;
   height: 100%;