Selaa lähdekoodia

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_web into V0.0.2

jiawuxian 2 vuotta sitten
vanhempi
commit
70b0b2540c

+ 2 - 2
.env.development

@@ -10,12 +10,12 @@ ENV = 'development'
 #罗俊
 # VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
-#VUE_APP_BASE_API = 'http://10.87.10.47:8080'
+VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+# VUE_APP_BASE_API = 'http://10.87.10.55:8080'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 0
package.json

@@ -59,6 +59,7 @@
     "vue-count-to": "1.0.13",
     "vue-cropper": "0.5.5",
     "vue-meta": "2.4.0",
+    "vue-quill-editor": "^3.0.6",
     "vue-router": "3.4.9",
     "vuedraggable": "2.24.3",
     "vuex": "3.6.0"

+ 8 - 0
src/api/core/evalulateTask.js

@@ -24,4 +24,12 @@ export function editEvaluate(data) {
     data
   })
 }
+//评分详情
+export function getevaluateByid(id){
+  return request({
+    url: `/core/task/details/${id}`,
+    method: 'get',
+    
+  })
+}
 

+ 7 - 0
src/api/resumption/outsourcing.js

@@ -56,3 +56,10 @@ export function publishEvaluate(id) {
     method: "get",
   });
 }
+// 取消发布计划
+export function withdraw(id) {
+  return request({
+    url: `/core/evaluatePlan/withdraw/${id}`,
+    method: "get",
+  });
+}

+ 43 - 0
src/api/safetyBook/aqbwbndjh.js

@@ -0,0 +1,43 @@
+import request from "@/utils/request";
+
+// 查询列表安全责任书
+export function listaqbwbndjh(data) {
+  return request({
+    url: "/core/safetyBook/aqbwbndjh/list",
+    method: "post",
+    data: data,
+  });
+}
+
+// 查询详细安全责任书
+export function getaqbwbndjh(id) {
+  return request({
+    url: "/core/safetyBook/aqbwbndjh/" + id,
+    method: "get",
+  });
+}
+
+// 新增/编辑安全责任书
+export function Add(data) {
+  return request({
+    url: "/core/safetyBook/aqbwbndjh/add",
+    method: "post",
+    data: data,
+  });
+}
+// 编辑安全责任书
+export function edit(data) {
+  return request({
+    url: "/core/safetyBook/aqbwbndjh/edit",
+    method: "post",
+    data: data,
+  });
+}
+
+// 删除安全责任书
+export function delaqbwbndjh(ids) {
+  return request({
+    url: "/core/safetyBook/aqbwbndjh/" + ids,
+    method: "delete",
+  });
+}

+ 43 - 0
src/api/safetyBook/hsggbsdj.js

@@ -0,0 +1,43 @@
+import request from "@/utils/request";
+
+// 查询列表安全责任书
+export function listhsggbsdj(data) {
+  return request({
+    url: "/core/safetyBook/hsggbsdj/list",
+    method: "post",
+    data: data,
+  });
+}
+
+// 查询详细安全责任书
+export function gethsggbsdj(id) {
+  return request({
+    url: "/core/safetyBook/hsggbsdj/" + id,
+    method: "get",
+  });
+}
+
+// 新增/编辑安全责任书
+export function Add(data) {
+  return request({
+    url: "/core/safetyBook/hsggbsdj/add",
+    method: "post",
+    data: data,
+  });
+}
+// 编辑安全责任书
+export function edit(data) {
+  return request({
+    url: "/core/safetyBook/hsggbsdj/edit",
+    method: "post",
+    data: data,
+  });
+}
+
+// 删除安全责任书
+export function delhsggbsdj(ids) {
+  return request({
+    url: "/core/safetyBook/hsggbsdj/" + ids,
+    method: "delete",
+  });
+}

BIN
src/assets/fonts/SourceHanSansCN-ExtraLight.otf


BIN
src/assets/fonts/SourceHanSansCN-Light.otf


BIN
src/assets/fonts/SourceHanSansCN-Normal.otf


+ 41 - 2
src/assets/styles/index.scss

@@ -5,13 +5,52 @@
 @import "./sidebar.scss";
 @import "./btn.scss";
 
+//@font-face {
+//  font-family: SYExtraLight;
+//  font-style: normal;
+//  font-weight: 300;
+//  src: local("ExtraLight"), url("@/assets/fonts/SourceHanSansCN-VF.ttf");
+//}
+
+@font-face {
+  font-family: SYExtraLight;
+  font-style: normal;
+  font-weight: 300;
+  src: local("ExtraLight"), url("@/assets/fonts/SourceHanSansCN-ExtraLight.otf");
+}
+
+@font-face {
+  font-family: SYLight;
+  font-style: normal;
+  src: local("SYLight"), url("@/assets/fonts/SourceHanSansCN-Light.otf");
+}
+
+@font-face {
+  font-family: SYNormal;
+  font-style: normal;
+  src: local("SYNormal"), url("@/assets/fonts/SourceHanSansCN-Normal.otf");
+}
+
 body {
   height: 100%;
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
-  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
-    Microsoft YaHei, Arial, sans-serif;
+  color: #000;
+  font-family: SYExtraLight,Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  /*框架自带字体*/
+  //font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
+  //  Microsoft YaHei, Arial, sans-serif;
+}
+
+.el-button{
+  //font-weight: 400;
+  font-family: SYLight,Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+}
+
+.el-table__header-wrapper{
+  //font-weight: normal;
+  font-family: SYNormal,Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
 }
 
 label {

+ 11 - 0
src/assets/styles/ruoyi.scss

@@ -274,3 +274,14 @@
 	position: relative;
 	float: right;
 }
+
+ .el-form-item__label{
+   font-size:13px!important;
+ }
+ .el-input__inner{
+   font-size:13px!important;
+ }
+
+ .el-button--mini{
+   font-size: 13px!important;
+ }

+ 1 - 1
src/components/elDialog/dialog.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog v-bind="$attrs" v-on="$listeners" @close="handleClose" :close-on-click-modal="false" class="centerDialog">
+    <el-dialog v-dialogDrag v-bind="$attrs" v-on="$listeners" @close="handleClose" :close-on-click-modal="false" class="centerDialog">
       <slot></slot>
       <slot name="footer" class="dialog-footer"></slot>
     </el-dialog>

+ 60 - 57
src/main.js

@@ -1,16 +1,16 @@
-import Vue from 'vue'
-import Element from 'element-ui'
-import './assets/styles/element-variables.scss'
-import '@/assets/styles/index.scss' // global css
-import '@/assets/styles/ruoyi.scss' // ruoyi css
-import App from './App'
-import store from './store'
-import router from './router'
-import directive from './directive' // directive
-import plugins from './plugins' // plugins
-import { download } from '@/utils/request'
-import './assets/icons' // icon
-import './permission' // permission control
+import Vue from "vue";
+import Element from "element-ui";
+import "./assets/styles/element-variables.scss";
+import "@/assets/styles/index.scss"; // global css
+import "@/assets/styles/ruoyi.scss"; // ruoyi css
+import App from "./App";
+import store from "./store";
+import router from "./router";
+import directive from "./directive"; // directive
+import plugins from "./plugins"; // plugins
+import { download } from "@/utils/request";
+import "./assets/icons"; // icon
+import "./permission"; // permission control
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
@@ -22,72 +22,75 @@ import {
   selectDictLabel,
   selectDictLabels,
   handleTree,
-  formatTime, imageUrl
+  formatTime,
+  imageUrl,
 } from "@/utils/ruoyi";
 // 分页组件
 import Pagination from "@/components/Pagination";
 // 自定义表格工具组件
-import RightToolbar from "@/components/RightToolbar"
+import RightToolbar from "@/components/RightToolbar";
 // 富文本组件
-import Editor from "@/components/Editor"
+import Editor from "@/components/Editor";
 // 文件上传组件
-import FileUpload from "@/components/FileUpload"
+import FileUpload from "@/components/FileUpload";
 // 图片上传组件
-import ImageUpload from "@/components/ImageUpload"
+import ImageUpload from "@/components/ImageUpload";
 // 图片预览组件
-import ImagePreview from "@/components/ImagePreview"
+import ImagePreview from "@/components/ImagePreview";
 
 // 图片预览组件
-import ImageListPreview from "@/components/ImageListPreview"
+import ImageListPreview from "@/components/ImageListPreview";
 // 字典标签组件
-import DictTag from '@/components/DictTag'
+import DictTag from "@/components/DictTag";
 // 头部标签组件
-import VueMeta from 'vue-meta'
+import VueMeta from "vue-meta";
 // 字典数据组件
-import DictData from '@/components/DictData'
+import DictData from "@/components/DictData";
 // 下拉tree组件
 import TreeSelect from "@riophae/vue-treeselect";
 // elementui Dialog组件
-import DialogCom from '@/components/elDialog/dialog.vue'
+import DialogCom from "@/components/elDialog/dialog.vue";
 //布局容器
-import layoutCom from '@/components/layoutContainer/index.vue'
+import layoutCom from "@/components/layoutContainer/index.vue";
+//dialog拖拽指令
+import "@/utils/dialogdrag.js";
 // 全局方法挂载
-Vue.prototype.getDicts = getDicts
+Vue.prototype.getDicts = getDicts;
 //根据参数键名查询参数值
-Vue.prototype.getConfigKey = getConfigKey
+Vue.prototype.getConfigKey = getConfigKey;
 //格式化时间
-Vue.prototype.parseTime = parseTime
+Vue.prototype.parseTime = parseTime;
 //格式化时间
-Vue.prototype.formatTime = formatTime
+Vue.prototype.formatTime = formatTime;
 //重置表单
-Vue.prototype.resetForm = resetForm
+Vue.prototype.resetForm = resetForm;
 //添加日期范围
-Vue.prototype.addDateRange = addDateRange
+Vue.prototype.addDateRange = addDateRange;
 //回显数据字典
-Vue.prototype.selectDictLabel = selectDictLabel
+Vue.prototype.selectDictLabel = selectDictLabel;
 // 回显数据字典(字符串、数组)
-Vue.prototype.selectDictLabels = selectDictLabels
-Vue.prototype.download = download
-Vue.prototype.handleTree = handleTree
-Vue.prototype.imageUrl = imageUrl
+Vue.prototype.selectDictLabels = selectDictLabels;
+Vue.prototype.download = download;
+Vue.prototype.handleTree = handleTree;
+Vue.prototype.imageUrl = imageUrl;
 
 // 全局组件挂载
-Vue.component('DictTag', DictTag)
-Vue.component('Pagination', Pagination)
-Vue.component('RightToolbar', RightToolbar)
-Vue.component('Editor', Editor)
-Vue.component('FileUpload', FileUpload)
-Vue.component('ImageUpload', ImageUpload)
-Vue.component('ImagePreview', ImagePreview)
-Vue.component('ImageListPreview', ImageListPreview)
-Vue.component('TreeSelect', TreeSelect)
-Vue.component('DialogCom', DialogCom)
-Vue.component('layoutCom', layoutCom)
+Vue.component("DictTag", DictTag);
+Vue.component("Pagination", Pagination);
+Vue.component("RightToolbar", RightToolbar);
+Vue.component("Editor", Editor);
+Vue.component("FileUpload", FileUpload);
+Vue.component("ImageUpload", ImageUpload);
+Vue.component("ImagePreview", ImagePreview);
+Vue.component("ImageListPreview", ImageListPreview);
+Vue.component("TreeSelect", TreeSelect);
+Vue.component("DialogCom", DialogCom);
+Vue.component("layoutCom", layoutCom);
 
-Vue.use(directive)
-Vue.use(plugins)
-Vue.use(VueMeta)
-DictData.install()
+Vue.use(directive);
+Vue.use(plugins);
+Vue.use(VueMeta);
+DictData.install();
 
 /**
  * If you don't want to use mock-server
@@ -99,14 +102,14 @@ DictData.install()
  */
 
 Vue.use(Element, {
-  size: sessionStorage.getItem('size') || 'medium' // set element-ui default size
-})
+  size: sessionStorage.getItem("size") || "medium", // set element-ui default size
+});
 
-Vue.config.productionTip = false
+Vue.config.productionTip = false;
 
 new Vue({
-  el: '#app',
+  el: "#app",
   router,
   store,
-  render: h => h(App)
-})
+  render: (h) => h(App),
+});

+ 52 - 0
src/utils/dialogdrag.js

@@ -0,0 +1,52 @@
+import Vue from "vue";
+
+// v-dialogDrag: 弹窗拖拽
+Vue.directive("dialogDrag", {
+  bind(el, binding, vnode, oldVnode) {
+    const headerElement = el.querySelector(".el-dialog__header");
+    const dragDialog = el.querySelector(".el-dialog");
+    headerElement.style.cursor = "move";
+
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+    const sty =
+      dragDialog.currentStyle || window.getComputedStyle(dragDialog, null);
+
+    headerElement.onmousedown = (e) => {
+      // 鼠标按下,计算当前元素距离可视区的距离
+      const disX = e.clientX - headerElement.offsetLeft;
+      const disY = e.clientY - headerElement.offsetTop;
+      console.log(e.clientX, headerElement.offsetLeft);
+      // 获取到的值带px 正则匹配替换
+      let styL, styT;
+      console.log(sty.left);
+
+      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+      if (sty.left.includes("%")) {
+        styL =
+          +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
+        styT =
+          +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
+      } else {
+        styL = +sty.left.replace(/\px/g, ""); // 写成/px/g 也行
+        styT = +sty.top.replace(/\px/g, "");
+      }
+
+      document.onmousemove = function (e) {
+        // 通过事件委托,计算移动的距离
+        const l = e.clientX - disX;
+        const t = e.clientY - disY;
+
+        // 移动当前元素
+        dragDialog.style.left = `${l + styL}px`;
+        dragDialog.style.top = `${t + styT}px`;
+
+        // 将此时的位置传出去
+      };
+
+      document.onmouseup = function (e) {
+        document.onmousemove = null;
+        document.onmouseup = null;
+      };
+    };
+  },
+});

+ 1 - 1
src/views/core/accessPlan/index.vue

@@ -96,7 +96,7 @@
           <el-table-column label="备注" align="center" prop="description"/>
           <el-table-column label="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
-              <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleUpdate(scope.row)" v-if="scope.row.parentId==null&&(scope.row.parentOrgId==isEdit||scope.row.orgId==isEdit)&&check==true"
+              <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleUpdate(scope.row)" v-if="scope.row.orgId==isEdit&&check==true"
                          v-hasPermi="['core:accessPlan:edit','core:accessPlan:query']">编辑
               </el-button>
               <el-button size="mini" type="text" v-if="scope.row.parentId==null&& scope.row.orgId==isEdit&&scope.row.isDistribute == 0 && (scope.row.planStatus==0||scope.row.planStatus==2)" icon="el-icon-arrow-down"

+ 1 - 1
src/views/core/drill/plan/index.vue

@@ -399,7 +399,7 @@ export default {
     },
     //已完成下发的计划不显示下发按钮
     checkCanPublish(row) {
-      if (row.issue == 0 && row.standard == 1 && (row.planStatus == 0 || row.planStatus == 2)) {
+      if (row.issue == 0 && row.standard == 1 && (row.planStatus == 0 || row.planStatus == 2) &&this.checkCanEdit(row)) {
         return true
       }
       return false;

+ 1 - 1
src/views/core/edu/plan/index.vue

@@ -446,7 +446,7 @@ export default {
 
     checkCanPublish(row) {
       //是标准计划且未下发,状态为草稿或停用,且所属机构为当前用户登录机构时才显示 “下发”按钮
-      if (row.issue == 0 && row.standard == 1 && (row.planStatus == 0 || row.planStatus == 2)&& row.belongOrgId == this.$store.getters.orgId) {
+      if (row.issue == 0 && row.standard == 1 && (row.planStatus == 0 || row.planStatus == 2)&&this.checkCanEdit(row)) {
         return true
       }
       return false;

+ 2 - 2
src/views/core/edu/task/index.vue

@@ -87,8 +87,8 @@
           height="600"
           size="small" v-loading="loading" :data="eduTaskList" @selection-change="handleSelectionChange">
           <el-table-column label="序号" align="center" width="70" prop="no"/>
-          <el-table-column label="培训主题" width="200" align="left" header-align="center" prop="title"/>
-          <el-table-column label="培训机构" width="200" align="left" header-align="center" prop="orgName"/>
+          <el-table-column label="培训主题" width="250" align="left" header-align="center" prop="title"/>
+          <el-table-column label="培训机构" width="150" align="left" header-align="center" prop="orgName"/>
           <!-- <el-table-column label="开始时间" align="center" prop="startDate" width="180">
           </el-table-column>
           <el-table-column label="截止时间" align="center" prop="endDate" width="180"></el-table-column> -->

+ 41 - 40
src/views/resumptionEvaluate/evaluate/editDialog.vue

@@ -87,10 +87,7 @@
             </el-col>
             <el-col :span="4">
               <el-form-item prop="buildTaskNow" label="立即生效:">
-                <el-checkbox
-                  
-                  v-model="formData.buildTaskNow"
-                  size="medium"
+                <el-checkbox v-model="formData.buildTaskNow" size="medium"
                   >勾选后当前周期开始生效</el-checkbox
                 >
               </el-form-item>
@@ -138,7 +135,11 @@ import * as api from "@/api/resumption/plan";
 
 import { findAllRole } from "@/api/system/role";
 import DialogSelect from "./addEvaluate.vue";
-import { addEvaluate, getEvaluateById ,editEvaluate} from "@/api/resumption/outsourcing.js";
+import {
+  addEvaluate,
+  getEvaluateById,
+  editEvaluate,
+} from "@/api/resumption/outsourcing.js";
 
 export default {
   dicts: ["evaluate_cycle", "sys_org_type"],
@@ -153,7 +154,13 @@ export default {
       orgType: null,
       roleNames: null,
 
-      tableData: [],
+      tableData: [
+        {
+          contentType: "1",
+          code: 0,
+          content: "被评价外包机构名称",
+        },
+      ],
       id: null,
       isShow: false,
       formData: {},
@@ -166,7 +173,6 @@ export default {
         evaluateCycle: [{ required: true, message: "请选择评价周期" }],
         planStatus: [{ required: true, message: "请选择计划状态" }],
       },
-     
     };
   },
   props: {
@@ -198,24 +204,9 @@ export default {
           break;
       }
     },
-    reset() {
-      return {
-        planName: null,
-        planType: null,
-        evaluateCycle: null,
-        planStatus: null,
-        orgType: null,
-        roleNames: null,
-
-        tableData: [],
-
-        buildTaskNow: false,
-      };
-    },
-
-    getRolesByOrg(falg='') {
-      if(falg){
 
+    getRolesByOrg(falg = "") {
+      if (falg) {
         this.formData.roleIds = [];
       }
       if (this.formData.orgType != null) {
@@ -229,40 +220,50 @@ export default {
       }
     },
 
-   
     onSelect(form) {
-      console.log(form);
       let isAdd = false;
+      let falg = false;
       this.tableData?.forEach((item) => {
         if (item.uid == form.uid) {
           Object.assign(item, form);
         } else {
           isAdd = true;
         }
+        if (item.code == form.code) {
+          falg = true;
+        }
       });
+      if (falg) {
+        return this.$message.error("编号重复请修改");
+      }
       if (isAdd || this.tableData.length == 0) {
         this.tableData.push(form);
       }
       console.log(this.tableData);
     },
     onOrgTypeChanged() {
-      
       this.getRolesByOrg(1);
     },
     async show(id = "", other = {}) {
       this.id = id;
-      this.tableData = [];
+      this.tableData = [
+        {
+          contentType: "1",
+          code: 0,
+          content: "被评价外包机构名称",
+        },
+      ];
 
       // await this.refresh(id, other);
 
       if (id) {
         await getEvaluateById(id).then((res) => {
-          let { code, msg ,data} = res;
+          let { code, msg, data } = res;
           if (code == 200) {
-            Object.assign(this.formData,data)
-            this.getRolesByOrg()
-            this.tableData=data.coreEvaluateContentList
-            delete this.formData.coreEvaluateContentList
+            Object.assign(this.formData, data);
+            this.getRolesByOrg();
+            this.tableData = data.coreEvaluateContentList;
+            delete this.formData.coreEvaluateContentList;
           } else {
             this.$message.error(msg);
           }
@@ -296,29 +297,29 @@ export default {
     onSubmit() {
       this.$refs.form.validate(async (isValidate) => {
         if (isValidate) {
-          if(this.tableData.length==0){
-            return this.$message.error(
-              "评价内容项,不能为空"
-            );
+          if (this.tableData.length == 0) {
+            return this.$message.error("评价内容项,不能为空");
           }
           if (falg) {
             return this.$message.error(
               "评价内容所有项,至少有一项评价类型为打分"
             );
           }
+
           let obj = {
             ...this.formData,
             coreEvaluateContentList: this.tableData,
           };
+          
           let falg = true;
           this.tableData.forEach((item) => {
             if (item.contentType == "2") {
               falg = false;
             }
           });
-          if(this.formData.id){
+          if (this.formData.id) {
             //编辑
-            
+
             editEvaluate(obj).then((res) => {
               let { code, msg } = res;
               if (code == 200) {
@@ -329,7 +330,7 @@ export default {
                 this.$message.error(msg);
               }
             });
-          }else{
+          } else {
             //新增
             addEvaluate(obj).then((res) => {
               let { code, msg } = res;

+ 27 - 4
src/views/resumptionEvaluate/evaluate/index.vue

@@ -136,6 +136,8 @@
                   active-value="0"
                   inactive-text="禁用"
                   inactive-value="1"
+                  active-color="#3bbca9"
+                  inactive-color="#d7000f"
                   @change="swtichChangeHandler(row)"
                 >
                 </el-switch>
@@ -143,7 +145,7 @@
             </el-table-column>
             <el-table-column
               label="操作"
-              width="180"
+              width="200"
               fixed="right"
               class-name="small-padding fixed-width"
             >
@@ -154,7 +156,7 @@
                   @click="publishHandler(row)"
                   type="text"
                   icon="el-icon-plus"
-                  >发布</el-button
+                  >{{row.isDistribute=='0'? '':'取消'}}发布</el-button
                 >
                 <el-button
                   size="mini"
@@ -194,6 +196,7 @@ import {
   swtichHandler,
   delelteEvaluate,
   publishEvaluate,
+  withdraw,
 } from "@/api/resumption/outsourcing.js";
 import OrgTree from "@/components/orgTree";
 import editEvaluate from "./editDialog.vue";
@@ -270,8 +273,24 @@ export default {
     },
     //发布
     publishHandler(row) {
-      // publishEvaluate
-      this.$modal
+       //0未 //1已
+      if(row.isDistribute=='1'){
+        this.$modal
+        .confirm("是否取消发布?")
+        .then(function () {})
+        .then(() => {
+          withdraw(row.id).then((res) => {
+            let { code, msg } = res;
+            if (code == 200) {
+              this.getList();
+              this.$modal.msgSuccess("取消发布成功");
+            } else {
+              this.$modal.msgSuccess(msg);
+            }
+          });
+        });
+      }else{
+        this.$modal
         .confirm("是否确认发布?")
         .then(function () {})
         .then(() => {
@@ -285,6 +304,10 @@ export default {
             }
           });
         });
+      }
+      
+    
+      
     },
     deleteHandler(row) {
       this.$modal

+ 122 - 44
src/views/resumptionEvaluate/evaluatePlan/editPlanEvaluate.vue

@@ -2,7 +2,7 @@
   <div class="rule-type">
     <DialogCom
       @colse="onHide"
-      :title="`外包评价${isEvaluate ? '查看' : '评价'}`"
+      :title="`外包评价${isEvaluate == 1 ? '查看' : ''}`"
       :visible.sync="isShow"
       width="1500px"
     >
@@ -35,23 +35,11 @@
           </el-row>
           <el-row>
             <el-col :span="8">
-              <el-form-item label="评价人:">
-                {{ formData.evaluateBy }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="评价时间:">
-                {{ formData.completeTime }}
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
               <el-form-item label="状态:">
                 {{ formData.status | filterStatus }}
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
-            <el-col :span="24">
+            <el-col :span="8">
               <el-form-item label="评价周期:">
                 {{ formData.evaluateCycle }}
               </el-form-item>
@@ -62,10 +50,12 @@
         <!-- tableData -->
         <div class="line_box">
           <div class="line"></div>
-          <div class="titleEvaluate">评价内容</div>
+          <div class="titleEvaluate">
+            {{ isEvaluate == 1 ? "评价记录" : "评价内容" }}
+          </div>
         </div>
 
-        <el-form label-width="130px">
+        <el-form v-if="isEvaluate == 0">
           <el-row v-for="(item, index) in tableData" :key="item.id">
             <el-col :span="24">
               <el-form-item
@@ -80,7 +70,7 @@
                 <el-input
                   type="textarea"
                   :rows="2"
-                  :disabled="isEvaluate=='1'"
+                  :disabled="isEvaluate == '1'"
                   placeholder="请输入内容"
                   v-model="item.score"
                 >
@@ -92,7 +82,6 @@
               <el-form-item label=" ">
                 <el-rate
                   :max="10"
-                  :disabled="isEvaluate=='1'"
                   v-model="item.score"
                   text-color="#ff9900"
                   show-score
@@ -102,11 +91,63 @@
             </el-col>
           </el-row>
         </el-form>
+        <div v-else>
+          <el-form v-for="(item, index) in tableDataContentVOS" :key="item.id">
+            <el-card class="box-card">
+              <el-row>
+                <el-col :span="12">
+                  <el-form-item label="评价时间"
+                    >{{ item.completeTime }}
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="评价人"
+                    >{{ item.evaluateBy }}
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row
+                v-for="sonItem in item.coreEvaluateTaskContentList"
+                :key="sonItem.code"
+              >
+                <el-col :span="24">
+                  <el-form-item
+                    class="formItemTitle"
+                    :label="`${sonItem.code}.${sonItem.content}`"
+                  >
+                  </el-form-item>
+                </el-col>
+                <!-- 文本 -->
+                <el-col :span="24" v-if="sonItem.contentType == 1">
+                  <el-form-item label=" ">
+                    <span class="scoreText">
+                      {{ sonItem.score }}
+                    </span>
+                  </el-form-item>
+                </el-col>
+                <!-- 评分 -->
+                <el-col :span="24" v-else>
+                  <el-form-item label=" ">
+                    <el-rate
+                      :max="10"
+                      v-model="sonItem.score"
+                      text-color="#ff9900"
+                      show-score
+                      score-template="{value}星"
+                    ></el-rate>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-card>
+          </el-form>
+        </div>
       </div>
 
       <div slot="footer" class="dialog-footer">
-        <el-button @click="onHide">取消</el-button>
-        <el-button type="primary" @click="onSubmit" v-if="isEvaluate=='0'">确定</el-button>
+        <el-button @click="onHide">关闭</el-button>
+        <el-button type="primary" @click="onSubmit" v-if="isEvaluate == '0'"
+          >确定</el-button
+        >
       </div>
     </DialogCom>
   </div>
@@ -114,12 +155,17 @@
 
 <script>
 import { mapGetters } from "vuex";
-import { getEvaluateById,editEvaluate } from "@/api/core/evalulateTask.js";
+import {
+  getEvaluateById,
+  editEvaluate,
+  getevaluateByid,
+} from "@/api/core/evalulateTask.js";
 export default {
   data() {
     return {
       isEvaluate: "",
       tableData: [],
+      tableDataContentVOS: [],
       id: null,
       isShow: false,
       formData: {},
@@ -139,7 +185,7 @@ export default {
           return "已完成";
           break;
         case "3":
-          return "已期";
+          return "已期";
           break;
       }
     },
@@ -153,21 +199,41 @@ export default {
     async show(id = "", isEvaluate) {
       this.id = id;
       this.tableData = [];
-      this.isEvaluate = isEvaluate+'';
+      this.tableDataContentVOS = [];
+      this.isEvaluate = isEvaluate + "";
 
       // isEvaluate 1 查看 0 评价
-
-      await getEvaluateById(id).then((res) => {
-        let { code, msg, data } = res;
-        if (code == 200) {
-          Object.assign(this.formData, data);
-
-          this.tableData = data.coreEvaluateContentList;
-          delete this.formData.coreEvaluateContentList;
-        } else {
-          this.$message.error(msg);
-        }
-      });
+      if (isEvaluate == 1) {
+        await getevaluateByid(id).then((res) => {
+          let { code, msg, data } = res;
+          if (code == 200) {
+            Object.assign(this.formData, data);
+            this.tableDataContentVOS = data.coreEvaluateTaskUserContentVOS;
+            this.tableDataContentVOS.forEach((item) => {
+              item.coreEvaluateTaskContentList.forEach((i) => {
+                if (i.contentType == 2) {
+                  i.score = +i.score;
+                }
+              });
+            });
+            console.log(this.tableDataContentVOS);
+            delete this.formData.coreEvaluateTaskUserContentVOS;
+          } else {
+            this.$message.error(msg);
+          }
+        });
+      } else {
+        await getEvaluateById(id).then((res) => {
+          let { code, msg, data } = res;
+          if (code == 200) {
+            Object.assign(this.formData, data);
+            this.tableData = data.coreEvaluateContentList;
+            delete this.formData.coreEvaluateContentList;
+          } else {
+            this.$message.error(msg);
+          }
+        });
+      }
 
       this.isShow = true;
     },
@@ -189,21 +255,25 @@ export default {
           falg = true;
         }
       });
-      if(falg){
-        return this.$message.error('存在未评价的项,请检查!')
+      if (falg) {
+        return this.$message.error("存在未评价的项,请检查!");
       }
       let obj = {
         id: this.formData.id,
-        coreEvaluateTaskContentList: this.tableData,
+        coreEvaluateTaskContentList: JSON.parse(JSON.stringify(this.tableData)),
       };
-      editEvaluate(obj).then(res=>{
-        let {code}=res
-        if(code==200){
+      obj.coreEvaluateTaskContentList.forEach((item) => {
+        item.score = item.score + "";
+      });
 
-          this.$emit('success')
-          this.onHide()
+      editEvaluate(obj).then((res) => {
+        let { code } = res;
+        if (code == 200) {
+          this.$emit("success");
+          this.$message.success('评价成功')
+          this.onHide();
         }
-      })
+      });
     },
   },
 };
@@ -219,6 +289,7 @@ export default {
 .line_box {
   display: flex;
   height: 20px;
+  margin-bottom: 20px;
   .titleEvaluate {
     color: #008cd6;
     vertical-align: middle;
@@ -236,6 +307,13 @@ export default {
     color: black;
   }
 }
+.box-card {
+  margin-bottom: 20px;
+  .scoreText {
+    font-size: 20px !important;
+  }
+}
+
 .form-item-comment {
   font-size: 12px;
   color: #999;

+ 8 - 6
src/views/resumptionEvaluate/evaluatePlan/index.vue

@@ -90,8 +90,8 @@
             <el-table-column label="外包评价名称" prop="evaluateName" />
             <el-table-column label="计划开始时间" prop="startTime" />
             <el-table-column label="计划结束时间" prop="endTime" />
-            <el-table-column label="评价人" prop="createBy" />
-            <el-table-column label="评价时间" prop="createTime" />
+            <el-table-column label="评价人" prop="evaluateBy" />
+            <el-table-column label="评价时间" prop="evaluateName" />
             <el-table-column
               label="状态"
               prop="status"
@@ -105,6 +105,7 @@
               class-name="small-padding fixed-width"
             >
               <template slot-scope="{ row }">
+               
                 <el-button
                   size="mini"
                   v-if="isEvaluateHandler(row)"
@@ -157,7 +158,7 @@ export default {
       queryParams: {
         orgId: null,
         checkSub: true,
-        status: null,
+        status: '',
         dataTime: [],
         evaluateName:'',
         pageNum: 1,
@@ -172,7 +173,7 @@ export default {
   created() {},
   mounted() {},
   computed: {
-    ...mapGetters(["orgId",'roles']),
+    ...mapGetters(["orgId",'roleList']),
   },
   methods: {
     statusChange(row) {
@@ -214,10 +215,11 @@ export default {
     },
     //判断是否能评价
     isEvaluateHandler(row){
+     
       let falg=false
       row.roleName?.split(',').forEach(item => {
-        this.roles.forEach(i=>{
-          if(i==item){
+        this.roleList.forEach(i=>{
+          if(i.roleName==item){
             falg=true
           }
         })

+ 219 - 0
src/views/safetyBook/aqbwbndjh/dialog.edit.vue

@@ -0,0 +1,219 @@
+<template>
+  <div class="rule-type">
+    <DialogCom
+      :title="id ? '编辑安全保卫部年度计划' : '新增安全保卫部年度计划'"
+      :visible.sync="isShow"
+      @close="onHide"
+      width="700px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="130px"
+          label-prefix=":"
+        >
+          <el-form-item prop="orgId" label="选择机构:">
+            <tree-select
+                v-model="formData.orgId"
+                :options="deptOptions"
+                :show-count="true"
+                :normalizer="tenantIdnormalizer"
+                :props="{ checkStrictly: true, label: 'name' }"
+                placeholder="请选择机构"
+                :noChildrenText="''"
+                noOptionsText="没有数据"
+                noResultsText="没有搜索结果"
+              />
+          </el-form-item>
+          <el-form-item prop="userIds" label="参与人员:">
+            <div>
+              <el-input
+                :readonly="true"
+                v-model="joinedStringArray"
+                placeholder="点击选择"
+              ></el-input>
+              <el-button @click="selectUser">选择</el-button>
+            </div>
+          </el-form-item>
+          <el-form-item prop="date" label="开会日期:">
+            <el-date-picker
+              v-model="formData.date"
+              style="width: 240px"
+              value-format="yyyy-MM-dd hh:mm:ss"
+              placeholder="请选择记录日期"
+              type="datetime"
+              :clearable="false"
+            ></el-date-picker>
+          </el-form-item>
+
+          <el-form-item label="照片" prop="images">
+            <imgs-upload
+              :limit="5"
+              v-model="formData.images"
+              :fileSize="2"
+            ></imgs-upload>
+          </el-form-item>
+          <div>
+            <el-form-item label="内容" prop="content">
+              <Editor style="height: 150px" v-model="formData.content"></Editor>
+            </el-form-item>
+          </div>
+        </el-form>
+      </div>
+
+      <div style="margin-top: 100px" slot="footer" class="dialog-footer">
+        <el-button @click="isShow = false">取消</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+      </div>
+    </DialogCom>
+    <UserSelector ref="UserSelector" @select="onUserSelect"></UserSelector>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+import { Add, edit, getaqbwbndjh } from "@/api/safetyBook/aqbwbndjh";
+import { deptTreeSelect } from "@/api/system/public";
+import UserSelector from "@/components/userSelector/index.vue";
+import ImgsUpload from "@/components/ImgsUpload";
+import Editor from "@/components/Editor";
+export default {
+  components: { UserSelector, ImgsUpload, Editor },
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      //修改新增中的机构树
+      deptOptions: [],
+      formDataRules: {
+        userIds: [{ required: true, message: "请选择参与人员" }],
+        date: [{ required: true, message: "请选择记录日期" }],
+        images: [{ required: true, message: "请选择照片" }],
+        content: [{ required: true, message: "请输入内容" }],
+        orgId: [{ required: true, message: "请选择机构" }],
+      },
+    };
+  },
+
+  watch: {},
+  computed: {
+    ...mapState([]),
+    joinedStringArray: {
+      get() {
+        if (this.formData.names == null || this.formData.names == undefined) {
+          this.formData.names = this.formData.userNames.split(", ");
+        }
+        return this.formData.names.join(", ");
+      },
+      set(value) {
+        this.formData.names = value.split(", ");
+      },
+    },
+  },
+  methods: {
+    ...mapMutations([]),
+
+    /** 查询机构树数据 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+    /** treeSelect组件自定义数据*/
+    tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
+      };
+    },
+
+    reset() {
+      return {
+        id: null,
+        names: [],
+        userIds: [],
+        date: null,
+        images: [],
+        content: null,
+        title: null,
+        orgId:null,
+      };
+    },
+    async refresh(id) {
+      if (id != null && id != undefined) {
+        await getaqbwbndjh(id).then((res) => {
+          this.formData.names = res.data.userNames.split(",");
+          this.formData = res.data;
+        });
+      }
+    },
+    async show(id) {
+      // console.log(id, "id");
+      this.getDeptTree();
+      this.formData = this.reset();
+      this.id = id;
+      await this.refresh(id);
+      this.isShow = true;
+    },
+
+    // 事件
+    onHide() {
+      this.formData = this.reset();
+      this.$refs.form.resetFields();
+    },
+    onSubmit() {
+      console.log(this.formData, "this.formData");
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        if (this.id == null || this.id == undefined) {
+          await Add(this.formData).then((res) => {
+            this.$emit("success");
+            this.isShow = false;
+          });
+        } else {
+          await edit(this.formData).then((res) => {
+            this.$emit("success");
+            this.isShow = false;
+          });
+        }
+      });
+    },
+    //选择用户回调
+    onUserSelect(data) {
+      var ids = data.map((obj) => obj.id);
+      var names = data.map((obj) => obj.name);
+      this.formData.userIds = ids;
+      this.formData.names = names;
+      this.formData.userNames = names.join(",");
+      //   console.log(this.formData.userIds, "this.formData.userIds");
+    },
+    //用户选择
+    selectUser(event) {
+      //   event.preventDefault();
+      this.$refs.UserSelector.show();
+    },
+
+    // 事件
+    //apimark//
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 337 - 0
src/views/safetyBook/aqbwbndjh/index.vue

@@ -0,0 +1,337 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--机构数据-->
+      <el-col :span="4" :xs="24" v-if="false">
+        <org-tree
+          v-model="queryParams.orgId"
+          @defaultKey="getDefaultKey"
+          @checkChange="checkChange"
+          @click="clickTreeNode"
+          wholeTree
+        ></org-tree>
+      </el-col>
+      <!--用户数据-->
+      <el-col :span="20" :xs="24">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
+          <el-form-item label="所属年份" prop="year" v-if="false">
+            <el-date-picker
+              v-model="queryParams.year"
+              :clearable="timeClearable"
+              type="year"
+              placeholder="选择时间"
+              value-format="yyyy"
+              @change="handleQuery"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd(null)"
+              v-hasPermi="['core:aqbwbndjh:add']"
+              >新增
+            </el-button>
+          </el-col>
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+          ></right-toolbar>
+        </el-row>
+        <!-- 表格数据 -->
+        <el-table
+          border
+          height="600"
+          size="small"
+          v-loading="loading"
+          :data="dataList"
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            align="center"
+            width="60"
+          />
+          <el-table-column
+            label="机构名称"
+            align="left"
+            width="200"
+            prop="orgName"
+          />
+          <el-table-column
+            label="记录人"
+            align="left"
+            width="160"
+            prop="userName"
+          >
+
+        </el-table-column>
+          <el-table-column
+            label="记录时间"
+            align="center"
+            width="120"
+            prop="date"
+          />
+         
+
+          <el-table-column
+            label="操作"
+            width="180"
+            fixed="right"
+            align="center"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit-outline"
+                @click="showImages(scope.row.images)"
+                v-hasPermi="['core:hsggbsdj:query']"
+                >查看照片
+              </el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit-outline"
+                @click="handleAdd(scope.row.id)"
+                v-hasPermi="['core:aqbwbndjh:edit']"
+                >编辑
+              </el-button>
+              <!-- <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-info"
+                @click="handleInfo(scope.row)"
+                v-hasPermi="['core:aqbwbndjh:query']"
+                >详情
+              </el-button> -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['core:aqbwbndjh:remove']"
+                >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <dialog-edit ref="editDialog" @success="getList()"></dialog-edit>
+    <el-image-viewer
+      v-if="imageViewer"
+      :on-close="closeImgViewer"
+      :url-list="srcList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listaqbwbndjh,
+  getaqbwbndjh,
+  Add,
+  edit,
+  delaqbwbndjh,
+} from "@/api/safetyBook/aqbwbndjh";
+import {  getLabel } from "@/views/commonOption";
+import DialogEdit from "./dialog.edit";
+import { deptTreeSelect } from "@/api/system/public";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import OrgTree from "@/components/orgTree/index.vue";
+import kOrgTree from "@/components/k-orgTree/index.vue";
+import KFileUpload from "@/components/K-FileUpload/index.vue";
+import tableList from "@/mixins/tableList";
+
+export default {
+  name: "aqbwbndjh",
+  components: { OrgTree, kOrgTree, KFileUpload, DialogEdit,    "el-image-viewer": () =>
+      import("element-ui/packages/image/src/image-viewer"), },
+  mixins: [tableList],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 安全责任书表格数据
+      dataList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 机构树选项
+      deptOptions: undefined,
+      // 机构名称
+      deptName: undefined,
+      //是否关联下级
+      checked: false,
+      timeClearable: true,
+      defaultProps: {
+        children: "children",
+        label: "name",
+      },
+      formFileListDefualtValue: [],
+      // 查询参数
+      queryParams: {
+        checkSub: true,
+        pageNum: 1,
+        pageSize: 10,
+        orgId: null,
+        year: null,
+        searchOrgId: null,
+      },
+      // 表单参数
+      form: {},
+      imageViewer: false,
+      srcList: [],
+      //默认选中节点
+      defaultKeys: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选机构树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  created() {
+    this.getDeptTree();
+    this.getConfigKey("sys.user.initPassword").then((response) => {
+      this.initPassword = response.msg;
+    });
+    this.getList();
+  },
+  methods: {
+    showImages(file) {
+      let array = file.split(",");
+      this.srcList = array;
+      this.imageViewer = true;
+    },
+    closeImgViewer() {
+      this.imageViewer = false;
+      this.srcList = [];
+    },
+    getLabel(options, value) {
+      return getLabel(options, value);
+    },
+    //新增
+    handleAdd(id) {
+      this.$refs.editDialog.show(id);
+    },
+    /** 查询安全责任书列表 */
+    getList() {
+      this.loading = true;
+      listaqbwbndjh(this.queryParams).then((response) => {
+        this.dataList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.handleQuery();
+    },
+    /** 下穿状态改变*/
+    changeCheckBox() {
+      this.getList();
+    },
+
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.handleQuery();
+    },
+
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.orgId = data.id;
+      this.handleQuery();
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {
+          return delaqbwbndjh(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+
+    /** 详情按钮操作 */
+    handleInfo(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getaqbwbndjh(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "安全责任书详情";
+      });
+    },
+  },
+};
+</script>
+<style>
+.ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>

+ 212 - 0
src/views/safetyBook/hsggbsdj/dialog.edit.vue

@@ -0,0 +1,212 @@
+<template>
+  <div class="rule-type">
+    <DialogCom
+      :title="id ? '编辑行社高管部署登记' : '新增行社高管部署登记'"
+      :visible.sync="isShow"
+      @close="onHide"
+      width="700px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="130px"
+          label-prefix=":"
+        >
+          <el-form-item prop="title" label="工作主题:">
+            <el-input
+              style="width: 100%; margin-bottom: 20px"
+              v-model="formData.title"
+              placeholder="请输入工作主题"
+            ></el-input>
+          </el-form-item>
+          <el-form-item prop="userIds" label="参与人员:">
+            <div>
+              <el-input
+                :readonly="true"
+                v-model="joinedStringArray"
+                placeholder="点击选择"
+              ></el-input>
+              <el-button @click="selectUser">选择</el-button>
+            </div>
+          </el-form-item>
+          <el-form-item prop="date" label="开会日期:">
+            <el-date-picker
+              v-model="formData.date"
+              style="width: 240px"
+              value-format="yyyy-MM-dd hh:mm:ss"
+              placeholder="请选择开会日期"
+              type="datetime"
+              :clearable="false"
+            ></el-date-picker>
+          </el-form-item>
+
+          <el-form-item label="照片" prop="images">
+            <imgs-upload
+              :limit="5"
+              v-model="formData.images"
+              :fileSize="2"
+            ></imgs-upload>
+          </el-form-item>
+          <div>
+            <el-form-item label="内容" prop="content">
+              <Editor style="height: 150px" v-model="formData.content"></Editor>
+            </el-form-item>
+          </div>
+        </el-form>
+      </div>
+
+      <div style="margin-top: 100px" slot="footer" class="dialog-footer">
+        <el-button @click="isShow = false">取消</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+      </div>
+    </DialogCom>
+    <UserSelector ref="UserSelector" @select="onUserSelect"></UserSelector>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+import { Add, edit, gethsggbsdj } from "@/api/safetyBook/hsggbsdj";
+import { deptTreeSelect } from "@/api/system/public";
+import UserSelector from "@/components/userSelector/index.vue";
+import ImgsUpload from "@/components/ImgsUpload";
+import Editor from "@/components/Editor";
+export default {
+  components: { UserSelector, ImgsUpload, Editor },
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      //修改新增中的机构树
+      deptOptions: [],
+      formDataRules: {
+        userIds: [{ required: true, message: "请选择参与人员" }],
+        date: [{ required: true, message: "请选择开会日期" }],
+        images: [{ required: true, message: "请选择照片" }],
+        content: [{ required: true, message: "请输入内容" }],
+        title: [{ required: true, message: "请输入内容" }],
+      },
+    };
+  },
+
+  watch: {},
+  computed: {
+    ...mapState([]),
+    joinedStringArray: {
+      get() {
+        if (this.formData.names == null || this.formData.names == undefined) {
+          this.formData.names = this.formData.userNames.split(", ");
+        }
+        return this.formData.names.join(", ");
+      },
+      set(value) {
+        this.formData.names = value.split(", ");
+      },
+    },
+  },
+  methods: {
+    ...mapMutations([]),
+
+    /** 查询机构树数据 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+    /** treeSelect组件自定义数据*/
+    tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
+      };
+    },
+
+    reset() {
+      return {
+        id: null,
+        names: [],
+        userIds: [],
+        date: null,
+        images: [],
+        content: null,
+        title: null,
+      };
+    },
+    async refresh(id) {
+      if (id != null && id != undefined) {
+        await gethsggbsdj(id).then((res) => {
+          this.formData.names = res.data.userNames.split(",");
+          this.formData = res.data;
+        });
+      }
+    },
+    async show(id) {
+      // console.log(id, "id");
+      this.getDeptTree();
+      this.formData = this.reset();
+      this.id = id;
+      await this.refresh(id);
+      this.isShow = true;
+    },
+
+    // 事件
+    onHide() {
+      this.formData = this.reset();
+      this.$refs.form.resetFields();
+    },
+    onSubmit() {
+      console.log(this.formData, "this.formData");
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        if (this.id == null || this.id == undefined) {
+          await Add(this.formData).then((res) => {
+            this.$emit("success");
+            this.isShow = false;
+          });
+        } else {
+          await edit(this.formData).then((res) => {
+            this.$emit("success");
+            this.isShow = false;
+          });
+        }
+      });
+    },
+    //选择用户回调
+    onUserSelect(data) {
+      var ids = data.map((obj) => obj.id);
+      var names = data.map((obj) => obj.name);
+      this.formData.userIds = ids;
+      this.formData.names = names;
+      this.formData.userNames = names.join(",");
+      //   console.log(this.formData.userIds, "this.formData.userIds");
+    },
+    //用户选择
+    selectUser(event) {
+      //   event.preventDefault();
+      this.$refs.UserSelector.show();
+    },
+
+    // 事件
+    //apimark//
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 343 - 0
src/views/safetyBook/hsggbsdj/index.vue

@@ -0,0 +1,343 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--机构数据-->
+      <el-col :span="4" :xs="24" v-if="false">
+        <org-tree
+          v-model="queryParams.orgId"
+          @defaultKey="getDefaultKey"
+          @checkChange="checkChange"
+          @click="clickTreeNode"
+          wholeTree
+        ></org-tree>
+      </el-col>
+      <!--用户数据-->
+      <el-col :span="20" :xs="24">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
+          <el-form-item label="所属年份" prop="year" v-if="false">
+            <el-date-picker
+              v-model="queryParams.year"
+              :clearable="timeClearable"
+              type="year"
+              placeholder="选择时间"
+              value-format="yyyy"
+              @change="handleQuery"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd(null)"
+              v-hasPermi="['core:hsggbsdj:add']"
+              >新增
+            </el-button>
+          </el-col>
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+          ></right-toolbar>
+        </el-row>
+        <!-- 表格数据 -->
+        <el-table
+          border
+          height="600"
+          size="small"
+          v-loading="loading"
+          :data="dataList"
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            align="center"
+            width="60"
+          />
+          <el-table-column
+            label="工作主题"
+            align="left"
+            width="200"
+            prop="title"
+          />
+          <el-table-column label="参与人" align="center" prop="userNames">
+          </el-table-column>
+          <el-table-column
+            label="开会日期"
+            align="left"
+            width="160"
+            prop="date"
+          >
+            <!-- <template slot-scope="r"
+              >{{
+                getLabel(dict.type.safety_book_type, `${r.row.type}`)
+              }}
+            </template> -->
+          </el-table-column>
+
+          <el-table-column
+            label="操作"
+            width="180"
+            fixed="right"
+            align="center"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit-outline"
+                @click="showImages(scope.row.images)"
+                v-hasPermi="['core:hsggbsdj:query']"
+                >查看照片
+              </el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit-outline"
+                @click="handleAdd(scope.row.id)"
+                v-hasPermi="['core:hsggbsdj:edit']"
+                >编辑
+              </el-button>
+              <!-- <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-info"
+                @click="handleInfo(scope.row)"
+                v-hasPermi="['core:hsggbsdj:query']"
+                >内容详情
+              </el-button> -->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleDelete(scope.row)"
+                v-hasPermi="['core:hsggbsdj:remove']"
+                >删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <dialog-edit ref="editDialog" @success="getList()"></dialog-edit>
+    <el-image-viewer
+      v-if="imageViewer"
+      :on-close="closeImgViewer"
+      :url-list="srcList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listhsggbsdj,
+  gethsggbsdj,
+  Add,
+  edit,
+  delhsggbsdj,
+} from "@/api/safetyBook/hsggbsdj";
+import { getLabel } from "@/views/commonOption";
+import DialogEdit from "./dialog.edit";
+import { deptTreeSelect } from "@/api/system/public";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import OrgTree from "@/components/orgTree/index.vue";
+import kOrgTree from "@/components/k-orgTree/index.vue";
+import KFileUpload from "@/components/K-FileUpload/index.vue";
+import tableList from "@/mixins/tableList";
+
+export default {
+  dicts: ["safety_book_type"],
+  name: "hsggbsdj",
+  components: {
+    OrgTree,
+    kOrgTree,
+    KFileUpload,
+    DialogEdit,
+    "el-image-viewer": () =>
+      import("element-ui/packages/image/src/image-viewer"),
+  },
+  mixins: [tableList],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 行社高管部署登记表格数据
+      dataList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 机构树选项
+      deptOptions: undefined,
+      // 机构名称
+      deptName: undefined,
+      //是否关联下级
+      checked: false,
+      timeClearable: true,
+      defaultProps: {
+        children: "children",
+        label: "name",
+      },
+      formFileListDefualtValue: [],
+      // 查询参数
+      queryParams: {
+        checkSub: true,
+        pageNum: 1,
+        pageSize: 10,
+        orgId: null,
+        year: null,
+        searchOrgId: null,
+      },
+      // 表单参数
+      form: {},
+      imageViewer: false,
+      srcList: [],
+      //默认选中节点
+      defaultKeys: [],
+    };
+  },
+  watch: {
+    // 根据名称筛选机构树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  created() {
+    this.getDeptTree();
+    this.getConfigKey("sys.user.initPassword").then((response) => {
+      this.initPassword = response.msg;
+    });
+    this.getList();
+  },
+  methods: {
+    showImages(file) {
+      let array = file.split(",");
+      this.srcList = array;
+      this.imageViewer = true;
+    },
+    closeImgViewer() {
+      this.imageViewer = false;
+      this.srcList = [];
+    },
+    getLabel(options, value) {
+      return getLabel(options, value);
+    },
+    //新增
+    handleAdd(id) {
+      this.$refs.editDialog.show(id);
+    },
+    /** 查询行社高管部署登记列表 */
+    getList() {
+      this.loading = true;
+      listhsggbsdj(this.queryParams).then((response) => {
+        this.dataList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.handleQuery();
+    },
+    /** 下穿状态改变*/
+    changeCheckBox() {
+      this.getList();
+    },
+
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.handleQuery();
+    },
+
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.name.indexOf(value) !== -1;
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.orgId = data.id;
+      this.handleQuery();
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {
+          return delhsggbsdj(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+
+    /** 详情按钮操作 */
+    handleInfo(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      gethsggbsdj(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "行社高管部署登记详情";
+      });
+    },
+  },
+};
+</script>
+<style>
+.ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>

+ 5 - 5
src/views/safetyBook/index.vue

@@ -23,7 +23,7 @@
         >
           <el-form-item label="所属年份" prop="year">
             <el-date-picker
-              v-model="queryParams.planStartTime"
+              v-model="queryParams.year"
               :clearable="timeClearable"
               type="year"
               placeholder="选择时间"
@@ -40,7 +40,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd(null)"
-              v-hasPermi="['core:materials:add']"
+              v-hasPermi="['core:book:add']"
               >新增
             </el-button>
           </el-col>
@@ -106,7 +106,7 @@
                 type="text"
                 icon="el-icon-edit-outline"
                 @click="handleAdd(scope.row.id)"
-                v-hasPermi="['core:materials:edit']"
+                v-hasPermi="['core:book:add']"
                 >编辑
               </el-button>
               <el-button
@@ -114,7 +114,7 @@
                 type="text"
                 icon="el-icon-info"
                 @click="handleInfo(scope.row)"
-                v-hasPermi="['core:materials:edit']"
+                v-hasPermi="['core:book:query']"
                 >详情
               </el-button>
               <el-button
@@ -122,7 +122,7 @@
                 type="text"
                 icon="el-icon-delete"
                 @click="handleDelete(scope.row)"
-                v-hasPermi="['core:materials:remove']"
+                v-hasPermi="['core:book:remove']"
                 >删除
               </el-button>
             </template>

+ 1 - 1
src/views/system/user/extend.vue

@@ -144,7 +144,7 @@
         </el-row>
         <el-row>
           <el-col :xs="24" :sm="24" :md="24" :lg="24">
-            <el-form-item v-if="formData.certificateWork == 0" label="上传相关证书">
+            <el-form-item v-if="formData.certificateWork != 0" label="上传相关证书">
               <imgs-upload :limit="5" v-model="formData.qualificationCertificateUrl" :fileSize="2"></imgs-upload>
             </el-form-item>
           </el-col>

+ 2 - 1
src/views/system/user/index.vue

@@ -42,7 +42,7 @@
               @keyup.enter.native="handleQuery"
             />
           </el-form-item>
-        
+
           <el-form-item label="用户角色" prop="roleIds">
             <!-- @visible-change="selectAllRoles" -->
             <el-select
@@ -390,6 +390,7 @@
           <el-col :span="10">
             <el-form-item label="用户角色" prop="roleIds">
               <el-select
+                :popper-append-to-body="false"
                 @visible-change="selectRoles"
                 style="width: 100%"
                 v-model="form.roleIds"