瀏覽代碼

审批奖票

walter 11 月之前
父節點
當前提交
41b1a1ef0e
共有 2 個文件被更改,包括 10 次插入5 次删除
  1. 4 3
      src/point/views/common/examinePopup.vue
  2. 6 2
      src/point/views/pointHome.vue

+ 4 - 3
src/point/views/common/examinePopup.vue

@@ -235,7 +235,7 @@
           <el-input :rows="4" type="textarea" v-model="adoptForm.remark" placeholder="说点什么(限100字)"></el-input>
         </el-form-item>
         <div style="padding-left: 80px">奖票用于优秀表现和重要事项的表彰</div>
-        <el-form-item label="发放奖票"><el-switch v-model="adoptForm.switch" active-color="#13ce66"></el-switch></el-form-item>
+        <el-form-item label="发放奖票"><el-switch :disabled="!!detail_info.pid" v-model="adoptForm.switch" active-color="#13ce66"></el-switch></el-form-item>
 
         <el-form-item label="发生时间" v-if="(detail_info.source_type == 2 || detail_info.source_type == 3) && detail_info.pid == 0">
           <el-row>
@@ -539,10 +539,11 @@ export default {
       self.detail_loading = true;
       this.$axiosUser('get', '/api/pro/integral/review', params)
         .then(res => {
-          if (res.data.code == 1) {
+          if (res.data.code === 1) {
             self.detail_info = res.data.data;
 
             self.detail_info.rule_id ? (self.adoptForm.rule_id = self.detail_info.rule_id) : '';
+            self.adoptForm.switch = self.detail_info.ticket_count > 0;
             if (res.data.data.item_id) {
               self.adoptForm.item_id = self.detail_info.item_id;
               self.adoptForm.showPoint = self.detail_info.point;
@@ -683,7 +684,7 @@ export default {
     // 确定通过
     submitAdopt(formName) {
       let self = this;
-      console.log(self.adoptForm.point)
+      // console.log(self.adoptForm.point)
       if(this.adoptForm.point===''||this.adoptForm.point===undefined){
         this.$message.error("请填写积分分值")
         return false

+ 6 - 2
src/point/views/pointHome.vue

@@ -255,7 +255,8 @@
                 </span>
               </NoData>
               <div>
-                <div ref="deptFormChart" :style="{ width: '100%', height: '400px' }"></div>
+<!--                <div ref="deptFormChart" :style="{ width: '100%', mimHeight: '400px' }"></div>-->
+                <div ref="deptFormChart" style="width: 100%; min-height: 400px;"></div>
               </div>
             </div>
           </div>
@@ -1673,8 +1674,11 @@ export default {
         option.series.data.push(value)
       })
 
-      //生成图像
+      //生成图像,动态计算容器高度
+      this.deptRankChart.getDom().style.height = this.deptRankList.length * 30 + 'px';
       this.deptRankChart.setOption(option);
+      //图像重新适应容器高度
+      this.deptRankChart.resize();
     },
     deptRankRuleChange(val){
       if (val.length === 0){