Quellcode durchsuchen

Merge branch 'V0.0.4' of http://10.87.21.221:8000/jzyd_yyds/soc_web into V0.0.4

zhulu vor 1 Jahr
Ursprung
Commit
7f0c19b2f8

+ 5 - 3
src/components/message/threeStateMessageBox.vue

@@ -8,9 +8,9 @@
   >
     <div>{{ message }}</div>
     <div slot="footer" class="dialog-footer">
-      <el-button size="small" type="primary" @click="onYes">是</el-button>
-      <el-button size="small" @click="onNo">否</el-button>
-      <el-button size="small" @click="onCanel">取消</el-button>
+      <el-button size="small" @click="onCanel">{{option && option.cancelText?option.cancelText:'取消'}}</el-button>
+      <el-button size="small" @click="onNo">{{option && option.noText?option.noText:''}}</el-button>
+      <el-button size="small" type="primary" @click="onYes">{{option && option.yesText?option.yesText:'是'}}</el-button>
     </div>
   </DialogCom>
 </template>
@@ -24,6 +24,7 @@ export default {
       title: "提示",
       callback: null,
       state: null, //0否,1:是,2取消
+      option:{}
     };
   },
   methods: {
@@ -32,6 +33,7 @@ export default {
      */
     show(message, callback, option) {
       this.isShow = true;
+      this.option=option
       this.message = message;
       this.callback = callback;
     },

+ 1 - 2
src/components/orgTreeSelect/index.vue

@@ -235,10 +235,9 @@ export default {
     handleNodeClick() {
     },
     onCheck(data, checked) {
-      if(this.sNodeList.length > 49){
+      if(this.sNodeList.length > 199){
         this.$refs.tree.setChecked(data, false);
         this.$message.error('所选机构过多,应小于200')
-        return
       }
       if (this.checked) {
         let checkNodes = this.$refs.tree.getCheckedNodes();

+ 7 - 0
src/layout/components/Sidebar/SidebarItem.vue

@@ -97,3 +97,10 @@ export default {
   }
 }
 </script>
+<style lang='scss'>
+.el-menu-item >span{
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>

+ 87 - 6
src/views/index.vue

@@ -42,11 +42,10 @@
       <!--  其他  -->
       <el-col :xs="24" :sm="12" :md="11"  :lg="14">
         <el-card class="chart-wrapper">
-          <p class="card-title">其他</p>
           <el-tabs type="border-card">
             <el-tab-pane label="通知公告">
               <div class="tab-panel">
-                <div class="msg-item" v-for="(v,i) in msgsList" :key="v.id">
+                <div class="msg-item" v-for="(v,i) in msgsList" :key="v.id" @click="showMsg(v)">
                     <span>{{v.title}}</span>
                     <span>{{v.publishTime}}</span>
                 </div>
@@ -67,7 +66,29 @@
       </el-col>
     </el-row>
 
-
+    <!--  新闻详情  -->
+    <DialogCom
+      title="详情"
+      :visible.sync="show"
+      width="800px"
+      append-to-body
+      @close="handleClose">
+      <div class="panel-box" v-if="selectMsg">
+        <h2>{{selectMsg.title}}</h2>
+        <p>{{selectMsg.publishTime}}</p>
+        <div class="content-box">
+          <p>{{selectMsg.content}}</p>
+          <ul v-if="selectMsg.fileList && selectMsg.fileList.length > 0">
+            <li v-for="(v,i) in selectMsg.fileList" :key="v.url">
+              <a :href="imageUrl(v.url)" target="_blank">
+<!--                <i class="el-icon-document"></i>-->
+                {{v.name}}
+              </a>
+            </li>
+          </ul>
+        </div>
+      </div>
+    </DialogCom>
   </div>
 </template>
 
@@ -85,9 +106,12 @@ export default {
   },
   data() {
     return {
+      iconList:[],
       dataList:[],
       fileList:[],
-      msgsList:[]
+      msgsList:[],
+      show:false,
+      selectMsg:null,
     }
   },
   mounted(){
@@ -95,6 +119,14 @@ export default {
   },
   methods: {
     imageUrl,
+    showMsg(v){
+      this.show = true;
+      this.selectMsg = v;
+    },
+    handleClose() {
+      this.show = false;
+      this.selectMsg = null;
+    },
     getData(){
       homeData().then(res=>{
         this.dataList = res.data;
@@ -127,8 +159,14 @@ export default {
     }
   }
   .el-tabs{
+    border-radius: 4px;
     box-shadow: none;
   }
+  .chart-wrapper{
+    .el-card__body{
+      padding: 0;
+    }
+  }
 }
 </style>
 <style lang="scss" scoped>
@@ -141,7 +179,13 @@ export default {
   }
 }
 .card-title{
+  width: 120px;
   margin: 0 0 10px 0;
+  padding-left: 4px;
+  color:#fff;
+  font-weight: bold;
+  letter-spacing: 2px;
+  background: linear-gradient(to right, #71bfe3, #fff);
 }
 .card-group{
   .card-title{
@@ -149,7 +193,7 @@ export default {
   }
 }
 .tab-panel{
-  height: 390px;
+  height: 455px;
   overflow: auto;
 }
 .msg-item{
@@ -159,7 +203,12 @@ export default {
   line-height: 39px;
   display: flex;
   justify-content: space-between;
+  cursor:pointer;
+  &:hover{
+    text-decoration: underline;
+  }
   >span{
+    display: inline-block;
     overflow: hidden;
     white-space:nowrap;
     text-overflow: ellipsis;
@@ -186,6 +235,7 @@ export default {
   &:hover{
     background-color: #1ea8e9;
     color:#fff;
+    transition: all .38s ease-out;
   }
 }
 .card-group {
@@ -249,7 +299,38 @@ export default {
     }
   }
 }
-
+.panel-box{
+  >h2{
+    text-align: center;
+  }
+  >p{
+    font-size: 14px;
+    color: #999;
+    text-align: end;
+  }
+  .content-box{
+    max-height: 600px;
+    overflow: auto;
+    >p{
+      text-indent: 2em;
+      word-break: break-word;
+      white-space: pre-wrap;
+      text-align: justify;
+      width: 100%;
+      color: #777;
+    }
+    >ul{
+      font-size: 15px;
+      color:#1ea8e9;
+      >li{
+        margin-bottom: 6px;
+      }
+      >li:hover{
+        text-decoration:underline;
+      }
+    }
+  }
+}
 @media (max-width:550px) {
   .card-panel-description {
     display: none;

+ 14 - 16
src/views/resumption/plan/dialog.edit.vue

@@ -151,7 +151,6 @@
                   placeholder="请选择履职人员"
                   multiple
                   filterable
-                  @change="handleRolesChange"
                 >
                   <el-option
                     v-for="item in resumptionRoles"
@@ -809,19 +808,18 @@ export default {
 
         this.formData.itemList = this.tableData == null ? [] : this.tableData;
         //新需求,自动填充角色
-        if (
-          this.formData.roleList != null &&
-          this.formData.roleList.length > 0 &&
-          this.selectedValues.length == 0
-        ) {
-          this.formData.roleList.forEach((item) => {
-            this.selectedValues.push(item);
-          });
-        }
-        this.formData.roleList =
-          this.selectedValues.length == 0 ? null : this.selectedValues;
+        // if (
+        //   this.formData.roleList != null &&
+        //   this.formData.roleList.length > 0 &&
+        //   this.selectedValues.length == 0
+        // ) {
+        //   this.formData.roleList.forEach((item) => {
+        //     this.selectedValues.push(item);
+        //   });
+        // }
+        // this.formData.roleList =
+        //   this.selectedValues.length == 0 ? null : this.selectedValues;
         //停用、使用中编辑
-debugger
         if (this.formData.planStatus =="1" ) {
           if (this.formData.taskHasCompleted == 1) {
             this.update(this.formData, false);
@@ -849,9 +847,9 @@ debugger
           // console.log(err,"err")
         });
     },
-    handleRolesChange(val) {
-      this.selectedValues = val.toString().split(",");
-    },
+    // handleRolesChange(val) {
+    //   this.selectedValues = val.toString().split(",");
+    // },
     // 事件
     //apimark//
   },

+ 62 - 42
src/views/resumption/plan/index.vue

@@ -285,7 +285,7 @@
               v-if="false"
             ></el-table-column>
 
-            <el-table-column fixed="right" width="200" label="操作">
+            <el-table-column fixed="right" width="210" label="操作">
               <template slot-scope="r">
                 <el-button
                   size="mini"
@@ -563,34 +563,45 @@ export default {
     sel(selectList, row) {
       let msg = "";
       if (row.planStatus == 0) {
-        msg = "是否立即生成任务?";
-        this.$refs["DialogThreeState"].show(msg, (state) => {
-          if (state == 0 || state == 1) {
-            this.loading = true;
-            api
-              .distribute(selectList, state == 1)
-              .then((response) => {
-                this.getList();
-                this.loading = false;
-              })
-              .catch(() => {
-                this.loading = false;
-              });
+        msg = "请选择从当前轮次或周期开始生成任务?";
+        this.$refs["DialogThreeState"].show(
+          msg,
+          (state) => {
+            if (state == 0 || state == 1) {
+              this.distributeInner(selectList, state == 1);
+            }
+          },
+          {
+            yesText: "当前轮次",
+            noText: "下周期",
+            cancelText: "取消下发",
           }
-        });
-      } else {
-        this.loading = true;
-        api
-          .distribute(selectList, false)
-          .then((response) => {
-            this.getList();
-            this.loading = false;
+        );
+      } else if (row.planStatus == 2) {
+        this.$modal
+          .confirm("因存在已完成任务,本次任务下发仅支持下周期生成任务", {
+            confirmButtonText: "下周期",
+            canelButtonText: "取消下发",
           })
-          .catch(() => {
-            this.loading = false;
+          .then(() => {
+            this.distributeInner(selectList, false);
           });
+      } else {
+        this.distributeInner(selectList, false);
       }
     },
+    distributeInner(selectList, imme) {
+      this.loading = true;
+      api
+        .distribute(selectList, imme)
+        .then((response) => {
+          this.getList();
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
     async getRolesByOrg() {
       await allRole().then((res) => {
         // console.info(res);
@@ -636,25 +647,34 @@ export default {
       } else {
         msg = "本周期未完成任务应用最新任务内容";
       }
-      this.$refs["DialogThreeState"].show(msg, async (state) => {
-        if (state == 2) {
-          return;
-        }
 
-        this.distributeHS(row.id, state == 1);
-      });
-      // this.$modal
-      //   .confirm(msg, "提示")
-      //   .then(() => {
-      //     // 用户点击了确认按钮
-      //     console.log("执行操作...");
-      //     distributeHS(row.id, true);
-      //   })
-      //   .catch(() => {
-      //     // 用户点击了取消按钮
-      //     // console.log("取消操作...");
-      //     distributeHS(row.id, false);
-      //   });
+      if (row.planStatus == 0) {
+        msg = "请选择从当前轮次或周期开始生成任务?";
+        this.$refs["DialogThreeState"].show(
+          msg,
+          (state) => {
+            if (state == 0 || state == 1) {
+              this.distributeHS(row.id, state == 1);
+            }
+          },
+          {
+            yesText: "当前轮次",
+            noText: "下周期",
+            cancelText: "取消下发",
+          }
+        );
+      } else if (row.planStatus == 2) {
+        this.$modal
+          .confirm("因存在已完成任务,本次任务下发仅支持下周期生成任务", {
+            confirmButtonText: "下周期",
+            canelButtonText: "取消下发",
+          })
+          .then(() => {
+            this.distributeHS(row.id, false);
+          });
+      } else {
+        this.distributeHS(row.id, false);
+      }
     },
     distributeHS(id, immediateEffect) {
       this.loading = true;

+ 4 - 4
src/views/resumption/rule/index.vue

@@ -162,7 +162,7 @@
               header-align="center"
               label="操作"
               class="small-padding fixed-width"
-              width="250"
+              width="300"
             >
               <template slot-scope="r">
                 <el-button
@@ -172,7 +172,7 @@
                   @click="onEdit(r.row.id)"
                   v-hasPermi="['resumption:rule:edit']"
                   v-if="orgId == r.row.orgId"
-                  >编辑</el-button
+                  >编辑手册</el-button
                 >
                 <el-button
                   size="mini"
@@ -181,7 +181,7 @@
                   @click="onManageContent(r.row.id)"
                   v-hasPermi="['resumption:rule:contentmanage']"
                   v-if="orgId == r.row.orgId && r.row.status == 0"
-                  >管理手册</el-button
+                  >管理履职内容</el-button
                 >
                 <el-button
                   size="mini"
@@ -190,7 +190,7 @@
                   @click="onManageContent(r.row.id)"
                   v-hasPermi="['resumption:rule:contentmanage']"
                   v-if="orgId != r.row.orgId || r.row.status == 1"
-                  >查看手册</el-button
+                  >查看履职内容</el-button
                 >
                 <el-button
                   type="text"

+ 2 - 1
src/views/safetyBook/hsggbsdj/dialog.edit.vue

@@ -108,7 +108,8 @@
           </el-form-item>
           <div>
             <el-form-item label="会议重点:" prop="content">
-              <Editor style="height: 150px" v-model="formData.content"></Editor>
+              <!-- <Editor style="height: 150px" v-model="formData.content"></Editor> -->
+              <el-input v-model="formData.content" type="textarea" :rows="3"></el-input>
             </el-form-item>
           </div>
         </el-form>

+ 4 - 4
src/views/safetycheck/rule/index.vue

@@ -159,7 +159,7 @@
               label="备注"
               v-if="columns[5].visible"
             ></el-table-column>
-            <el-table-column header-align="center" label="操作" width="250">
+            <el-table-column header-align="center" label="操作" width="300">
               <template slot-scope="r">
                 <div>
                   <el-button
@@ -169,7 +169,7 @@
                     @click="onEdit(r.row.id)"
                     v-if="orgId == r.row.orgId"
                     v-hasPermi="['safetycheck:rule:edit']"
-                    >编辑</el-button
+                    >编辑手册</el-button
                   >
                   <el-button
                     size="mini"
@@ -178,7 +178,7 @@
                     @click="onManageContent(r.row.id)"
                     v-if="r.row.status == 0 && orgId == r.row.orgId"
                     v-hasPermi="['safetycheck:rule:contentmanage']"
-                    >管理手册</el-button
+                    >管理检查内容</el-button
                   >
                   <el-button
                     size="mini"
@@ -187,7 +187,7 @@
                     @click="onManageContent(r.row.id)"
                     v-if="r.row.status != 0 || orgId != r.row.orgId"
                     v-hasPermi="['safetycheck:rule:contentmanage']"
-                    >查看手册</el-button
+                    >查看检查内容</el-button
                   >
                   <el-button
                     type="text"