소스 검색

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

luojun 2 년 전
부모
커밋
20f504b87e

+ 5 - 2
src/components/ImageListPreview/index.vue

@@ -22,7 +22,7 @@
              v-else>
           <el-image :src="v.url"
                     class="avatar"
-                    :preview-src-list="fileList"
+                    :preview-src-list="previewSrcList"
                     :z-index="6000" />
           <!-- <i v-show="!disabled"
              class="el-icon-error"
@@ -39,6 +39,7 @@ export default {
   data() {
     return {
       fileList: [],
+      previewSrcList:[]
     }
   },
   watch: {
@@ -48,10 +49,12 @@ export default {
         if(newVal){
         const list = Array.isArray(newVal) ? newVal : this.value.split(",");
         this.fileList = list.map((url) => ({ name: url, url }));
-        console.log("this.fileList",this.fileList);
+        this.previewSrcList=list.map((url) => url);
+        console.log("this.fileList",this.fileList,this.previewSrcList);
       }        
         else{
           this.fileList =[];
+          this.previewSrcList=[];
         }
       },
     },

+ 8 - 3
src/components/K-FileUpload/index.vue

@@ -22,9 +22,8 @@
       <!-- <el-button size="mini" type="primary">{{ btnName }}</el-button> -->
       <!-- 上传提示 -->
       <div class="el-upload__tip" slot="tip" v-if="showTip">
-        请上传
-        <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b></template>
-        <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b></template>
+        文件<template v-if="fileSize">大小不超过<b style="color: #f56c6c">{{ fileSize }}MB</b></template>
+        <template v-if="fileType"> 格式为<b style="color: #f56c6c">{{ fileType.join("/") }}</b></template>
         的文件
       </div>
     </el-upload>
@@ -101,6 +100,11 @@ export default {
           // 首先将值转为数组
           const list = Array.isArray(val) ? val : this.value.split(',');
           console.log("watch fileList", list)
+          if(list.length>this.limit)
+          {
+            this.handleExceed();
+            return;
+          }
           // 然后将数组转为对象数组
           this.fileList = list.map(item => {
             if (typeof item === "string") {
@@ -118,6 +122,7 @@ export default {
             return item;
           });
           this.fileValueList=[...this.fileList];
+          this.$emit("input", this.listToTagObj(this.fileValueList));
         } else {
           this.fileList = [];
           this.fileValueList=[];

+ 1 - 1
src/components/layoutContainer/index.vue

@@ -66,7 +66,7 @@ export default {
 
   display: flex;
   .leftBar {
-    min-width: 250px;
+    min-width: 300px;
     // overflow: scroll;
   }
   .rightBar {

+ 51 - 9
src/components/orgTree/orgDropDown.vue

@@ -17,29 +17,29 @@ export default {
   name: "orgDropTree",
   data() {
     return {
-      deptOptions: []
+      deptOptions: [],
     };
   },
   props: {
     value: {
-      type:String,      
+      type: String,
+    },
+    label: {
+      type: String,
+      default: "shortName",
     },
-    label:{
-      type:String,
-      default:'shortName'
-    }
   },
   watch: {
     // value(v){
     //   // debugger
     //   // console.info("watch",v);
-    // }   
+    // }
   },
   computed: {
-    val:sync('value')     ,
+    val: sync("value"),
   },
   components: { Treeselect },
-  
+
   methods: {
     /** 查询机构下拉树结构 */
     getDeptTree() {
@@ -76,3 +76,45 @@ export default {
   },
 };
 </script>
+<style scoped lang="scss">
+::v-deep {
+  .vue-treeselect__menu {
+    overflow-x: auto !important;
+    width: 250px;
+    max-height: 300px !important;
+  }
+
+  
+  .vue-treeselect__label {
+    overflow: unset;
+
+    text-overflow: unset;
+  }
+
+
+  .vue-treeselect div,
+  .vue-treeselect span {
+    box-sizing: content-box;
+
+    // white-space: nowrap;
+
+    // text-overflow: ellipsis;
+  }
+
+  // 选中后的溢出隐藏
+
+  .vue-treeselect__multi-value-label {
+    display: block;
+
+    width: 140px;
+
+    overflow: hidden;
+
+    white-space: nowrap;
+
+    text-overflow: ellipsis;
+  }
+
+
+}
+</style>

+ 3 - 1
src/components/table/gx.search.table.vue

@@ -198,7 +198,9 @@ export default {
   },
   created() {},
   mounted() {
-    if (this.list && !this.manual) {
+    //console.log("gx mounted",this.list,this.manual)
+    // this.list &&
+    if ( !this.manual) {
       this.load(this.searchData)
     }
   },

+ 1 - 1
src/utils/ruoyi.js

@@ -210,7 +210,7 @@ export function tansParams(params) {
             let params = propName + '[' + key + ']';
             var subPart = encodeURIComponent(params) + "=";
             if(value[key] && Object.prototype.toString.call(value[key]) === '[object Date]'){
-              result += subPart + encodeURIComponent(value[key].toLocaleString()) + "&";
+              result += subPart +dayjs(value[key]).format("YYYY-MM-DD HH:mm:ss") + "&";
             }else{
               result += subPart + encodeURIComponent(value[key]) + "&";
             }

+ 5 - 5
src/views/commonOption.js

@@ -1,5 +1,5 @@
-const getLabel=(options,value)=>{
-  let option=options.find(o=>o.value==value);
-  return option?option.label:'';
-}
-export { getLabel};
+const getLabel = (options, value, defaultText) => {
+  let option = options.find((o) => o.value == value);
+  return option ? option.label : defaultText != null ? defaultText : "";
+};
+export { getLabel };

+ 15 - 4
src/views/core/edu/plan/dialog.select.file.vue

@@ -13,8 +13,7 @@
         ref="st"
         url="/core/materials/fileList"
         method="post"
-        :search-data="search"
-        :manual="true"
+        :search-data="search"        
         :pageable="true"
         :select="true"
         :select-default="selectList"
@@ -45,7 +44,7 @@
           >
           <template slot-scope="scope">
             <template v-if="scope.row.fileList">
-              <el-tag size="mini" type="success" v-for="(item, index) in scope.row.fileList"
+              <el-tag style="cursor: pointer;margin-right: 5px;" size="mini" type="success" effect="plain" @click="downLoadFile(JSON.parse(item).url)" v-for="(item, index) in scope.row.fileList"
                       :key="index">
                 {{ JSON.parse(item).name }}
               </el-tag>
@@ -118,9 +117,21 @@ export default {
         title: null,
         fileName: null,
         orgId:this.$store.getters.orgId,
-        t:new Date(),
+        // t:new Date(),
       };
     },
+    downLoadFile(url)
+    {
+        if(process.env.VUE_APP_BASE_API!=='/')
+        {
+          url=process.env.VUE_APP_BASE_API+url;
+        }        
+        const a = document.createElement("a");
+        a.setAttribute("download", name);
+        a.setAttribute("target", "_blank");
+        a.setAttribute("href", url);
+        a.click();
+    }
   },
   mounted() {
 

+ 5 - 3
src/views/core/edu/plan/index.vue

@@ -219,7 +219,6 @@
                                        placeholder="请选择培训机构"/>
                         </el-form-item>-->
             <el-form-item v-show="form.execOrgType" label="培训机构" prop="planExecOrgIdList">
-              <p>{{form.planExecOrgIdList}}</p>
               <org-tree-select
                 v-model="form.planExecOrgIdList"
                 :queryData="form.execOrgType"
@@ -605,10 +604,13 @@ export default {
     },
     fileSelected(list) {
       if (!list) return;
+      let tempArry=[];
       list.forEach(x => {
-        this.form.fileList = this.form.fileList.concat(x.fileList);
+        tempArry=tempArry.concat(x.fileList);
       })
-
+      console.log("fileSelected",tempArry);
+      //this.form.fileList=this.form.fileList.concat(tempArry);
+      this.formFileListDefualtValue =this.form.fileList.concat(tempArry);
     },
   }
 };

+ 17 - 16
src/views/core/edu/task/dialog.info.vue

@@ -218,24 +218,25 @@ export default {
             xhr.send();
         },
        saveAs(blob, filename) {
-            // if (window.navigator.msSaveOrOpenBlob) {
-            //     navigator.msSaveBlob(blob, filename);
-            // } else {
-               // var link = document.createElement("a");
-                //var body = document.querySelector("body");
+             console.log("saveAs",blob,filename)
+            if (window.navigator.msSaveOrOpenBlob) {
+                navigator.msSaveBlob(blob, filename);
+            } else {
+               var link = document.createElement("a");
+                var body = document.querySelector("body");
 
-                // link.href = window.URL.createObjectURL(blob);
-                // link.download = filename;
-                //
-                // // fix Firefox
-                // link.style.display = "none";
-                // body.appendChild(link);
-                //
-                // link.click();
-                // body.removeChild(link);
+                link.href = window.URL.createObjectURL(blob);
+                link.download = filename;
+                
+                // fix Firefox
+                link.style.display = "none";
+                body.appendChild(link);
+                
+                link.click();
+                body.removeChild(link);
 
-               // window.URL.revokeObjectURL(link.href);
-         //   }
+               window.URL.revokeObjectURL(link.href);
+           }
         },
         // 事件
         //apimark//

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

@@ -291,7 +291,7 @@ export default {
       if(row.status>0) return false;
       if(!row.taskRoleList)   return false;
       let isOver =this.isNotOverOrUnStart(row);
-      console.log("isNotOverOrUnStart",isOver);
+      // console.log("isNotOverOrUnStart",isOver);
       row.taskRoleList.forEach((taskRole) => {
         this.$store.getters.roleList.forEach((role) => {
           if (taskRole.roleId == role.roleId) {
@@ -308,7 +308,7 @@ export default {
       const endDate = dayjs(row.endDate).startOf('day'); // 转换结束时间为 Moment.js 对象,并将时分秒部分设置为00时00分00秒
       // 判断开始时间和结束时间是否是同一天
       const isSameDay = startDate.isSame(endDate, 'day');
-      console.log("isOverOrUnStart",currentTime,startDate,endDate);
+      // console.log("isOverOrUnStart",currentTime,startDate,endDate);
       // 如果是同一天,则判断当前时间是否在开始时间和结束时间之间(包括开始和结束时间)
       // if (isSameDay) {
       //   return dayjs(currentTime).isBetween(startDate, endDate, null, '[]');

+ 56 - 56
src/views/information/configuration/index.vue

@@ -11,7 +11,7 @@
           <el-col :xs="24" :sm="12" :md="8" :lg="5">
             <el-form-item label="营业前提醒:" prop="front">
 
-              <el-input-number size="mini" style="width: 70%;" v-model="day.font" @change="handleChange" :min="1"
+              <el-input-number size="mini" style="width: 70%;" v-model="day.front" @change="handleChange" :min="1"
                 :max="10" label="描述文字"></el-input-number>
               分钟
 
@@ -53,41 +53,17 @@
               每周履职
             </div>
           </el-col>
-
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
+          <el-col>
             <el-form-item label="全天提醒:" prop="allDay">
               <el-input-number size="mini" style="width: 30%;" v-model="week.allDay" @change="handleChange" :min="1"
                 :max="10" label="描述文字"></el-input-number>
               分钟
             </el-form-item>
-          </el-col>
-
+          </el-col> 
         </el-row>
-
       </div>
     </el-form>
-    <!-- <el-form :model="week" :rules="rules" ref="week" label-width="130px">
-      <div class="form-item">
-        <el-row>
-          <el-col :xs="24" :sm="12" :md="8" :lg="4">
-            <div class="item-title">
-              每周履职
-            </div>
-          </el-col>
-      
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
-            <el-form-item label="提前提醒:" prop="allDay">
-
-              <el-input-number size="mini" style="width: 70%;" v-model="week.allDay" @change="handleChange" :min="1"
-                :max="10" label="描述文字"></el-input-number>
-              天
-
-
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </div>
-    </el-form> -->
+  
     <el-form :model="month" :rules="rules" ref="month" label-width="130px">
       <div class="form-item">
         <el-row>
@@ -96,13 +72,13 @@
               每月履职
             </div>
           </el-col>
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
-            <el-form-item label="提前提醒:" prop="educationType">
-              <el-input-number size="mini" v-model="num" style="width: 70%" @change="handleChange" :min="1" :max="10"
-                label="描述文字"></el-input-number>
-              
+          <el-col>
+            <el-form-item label="全天提醒:" prop="allDay">
+              <el-input-number size="mini" style="width: 30%;" v-model="month.allDay" @change="handleChange" :min="1"
+                :max="10" label="描述文字"></el-input-number>
+              分钟
             </el-form-item>
-          </el-col>
+          </el-col> 
         </el-row>
       </div>
     </el-form>
@@ -114,12 +90,13 @@
               每季履职
             </div>
           </el-col>
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
-            <el-form-item label="提前提醒:" prop="educationType">
-              <el-input-number size="mini" v-model="num" style="width: 70%" @change="handleChange" :min="1" :max="10"
-                label="描述文字"></el-input-number>
+          <el-col>
+            <el-form-item label="全天提醒:" prop="allDay">
+              <el-input-number size="mini" style="width: 30%;" v-model="season.allDay" @change="handleChange" :min="1"
+                :max="10" label="描述文字"></el-input-number>
+              分钟
             </el-form-item>
-          </el-col>
+          </el-col> 
         </el-row>
       </div>
     </el-form>
@@ -131,12 +108,13 @@
               半年履职
             </div>
           </el-col>
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
-            <el-form-item label="提前提醒:" prop="educationType">
-              <el-input-number size="mini" v-model="num" style="width: 70%" @change="handleChange" :min="1" :max="10"
-                label="描述文字"></el-input-number>
+          <el-col>
+            <el-form-item label="全天提醒:" prop="allDay">
+              <el-input-number size="mini" style="width: 30%;" v-model="halfYear.allDay" @change="handleChange" :min="1"
+                :max="10" label="描述文字"></el-input-number>
+              分钟
             </el-form-item>
-          </el-col>
+          </el-col> 
         </el-row>
       </div>
     </el-form>
@@ -148,12 +126,13 @@
               每年履职
             </div>
           </el-col>
-          <el-col :xs="24" :sm="12" :md="8" :lg="5">
-            <el-form-item label="提前提醒:" prop="educationType">
-              <el-input-number size="mini" v-model="num" style="width: 70%" @change="handleChange" :min="1" :max="10"
-                label="描述文字"></el-input-number>
+          <el-col>
+            <el-form-item label="全天提醒:" prop="allDay">
+              <el-input-number size="mini" style="width: 30%;" v-model="year.allDay" @change="handleChange" :min="1"
+                :max="10" label="描述文字"></el-input-number>
+              分钟
             </el-form-item>
-          </el-col>
+          </el-col> 
         </el-row>
       </div>
     </el-form>
@@ -176,15 +155,36 @@ export default {
       day: {
         resumptionCycle: 1,
         allDay: null,
+        front: null,
         centre: null,
         after: null,
-        timeUnit: null,
+        timeUnit: 1,
+      },
+      week: {
+        resumptionCycle: 2,
+        allDay: null,
+        timeUnit: 2
+      },
+      month: {
+        resumptionCycle: 3,
+        allDay: null,
+        timeUnit: 2
+      },
+      season: {
+        resumptionCycle: 4,
+        allDay: null,
+        timeUnit: 2
+      },
+      halfYear: {
+        resumptionCycle: 5,
+        allDay: null,
+        timeUnit: 2
+      },
+      year: {
+        resumptionCycle: 6,
+        allDay: null,
+        timeUnit: 2
       },
-      week: {},
-      month: {},
-      season: {},
-      halfYear: {},
-      year: {},
 
       rules: {
         name: [
@@ -290,7 +290,7 @@ export default {
       if (!flag) return;
       let data = {
 
-        coreResumptionConfiguration: [this.day, this.week, this.month]
+        coreResumptionConfiguration: [this.day, this.week, this.month,this.season,this.halfYear,this.year]
       };
       insertConfiguration(data).then(response => {
         this.$modal.msgSuccess("新增成功");

+ 3 - 3
src/views/resumption/protection/index.vue

@@ -151,7 +151,7 @@
             v-if="columns[4].visible"
           >
             <template slot-scope="r"
-              >{{ getLabel(dict.type.protection_status, r.row.status) }}
+              >{{ getLabel(dict.type.protection_status, r.row.status,"未知") }}
             </template>
           </el-table-column>
           <el-table-column
@@ -167,7 +167,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="updateStatus(r.row.id, 1)"
-                v-hasPermi="['device:protection:maintain']"
+                v-hasPermi="['device:protectionstatus:maintain']"
                 >布防</el-button
               >
               <el-button
@@ -175,7 +175,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="updateStatus(r.row.id, 0)"
-                v-hasPermi="['device:protection:maintain']"
+                v-hasPermi="['device:protectionstatus:maintain']"
                 >撤防</el-button
               > -->
               <el-button

+ 13 - 5
src/views/resumption/taskManager/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="bg-transparent flex resumption">
+  <div class="app-container">
     <el-row :gutter="20">
       <!--机构数据-->
       <el-col :span="4" :xs="24">
@@ -412,7 +412,7 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from "vuex";
+import {mapGetters } from "vuex";
 // import { Message } from "element-ui";
 import DialogDetail from "./dialog.detail";
 import DialogScanRecord from "./dialog.scanrecord";
@@ -513,6 +513,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
+      selectedOrgName:null,
       pageData: [],
       columns: [
         { key: 0, label: `序号`, visible: true },
@@ -618,10 +619,10 @@ export default {
     },
   },
   computed: {
-    ...mapState(["org", "loginUser"]),
+    ...mapGetters(["orgName"])
   },
   methods: {
-    ...mapMutations([]),
+   
     getLabel,
     toName(row) {
       // const ymd = row.ymd;
@@ -654,7 +655,12 @@ export default {
         });
         return;
       }
-      await api.exportResumptionRecord(this.queryParams);
+
+      this.download('/core/resumption/record/export', {
+        ...this.queryParams
+      }, `【${this.selectedOrgName}】-履职记录${new Date().getTime()}.xlsx`)
+
+      // await api.exportResumptionRecord(this.queryParams);
     },
     showDetail(row) {
       this.$refs.detaildialog.show(row.resumptionId, row.name);
@@ -666,6 +672,7 @@ export default {
 
     getDefaultKey(key) {
       this.queryParams.orgId = key;
+      this.selectedOrgName=this.orgName;
       this.getList();
       this.loadRoles(key);
       this.loadPlanList();
@@ -679,6 +686,7 @@ export default {
     // 节点单击事件
     clickTreeNode(data) {
       this.queryParams.orgId = data.id;
+      this.selectedOrgName=data.name;
       this.loadPlanList();
       this.loadRoles();
       this.getList();

+ 1 - 1
src/views/system/bind/index.vue

@@ -23,7 +23,7 @@
           </el-form-item>
 
           <el-form-item label="标签编号" prop="code">
-            <el-input v-model="queryParams.code" placeholder="请输入标签编号" clearable @keyup.enter.native="handleQuery" />
+            <el-input maxlength="50" v-model="queryParams.code" placeholder="请输入标签编号" clearable @keyup.enter.native="handleQuery" />
           </el-form-item>