Ver Fonte

新增农历日历依赖及字典组件优化

yusheng há 8 meses atrás
pai
commit
c11425daa7

+ 14 - 0
package-lock.json

@@ -33,6 +33,7 @@
         "highlight.js": "9.18.5",
         "jsbarcode": "^3.11.5",
         "json-bigint": "^1.0.0",
+        "lunar-calendar": "^0.1.4",
         "nprogress": "^0.2.0",
         "tinymce": "^5.10.5",
         "vue": "^2.7.10",
@@ -9643,6 +9644,14 @@
         "yallist": "^3.0.2"
       }
     },
+    "node_modules/lunar-calendar": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmmirror.com/lunar-calendar/-/lunar-calendar-0.1.4.tgz",
+      "integrity": "sha512-5r87vbg5yg56z/jkf3A+Ur+ZggUTiJw1VATT9P7RELQgWcTNhfJ+OLkNYroSna6r65bMqyaAgapo9vRN40L75A==",
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/make-dir": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -24385,6 +24394,11 @@
         "yallist": "^3.0.2"
       }
     },
+    "lunar-calendar": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmmirror.com/lunar-calendar/-/lunar-calendar-0.1.4.tgz",
+      "integrity": "sha512-5r87vbg5yg56z/jkf3A+Ur+ZggUTiJw1VATT9P7RELQgWcTNhfJ+OLkNYroSna6r65bMqyaAgapo9vRN40L75A=="
+    },
     "make-dir": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "highlight.js": "9.18.5",
     "jsbarcode": "^3.11.5",
     "json-bigint": "^1.0.0",
+    "lunar-calendar": "^0.1.4",
     "nprogress": "^0.2.0",
     "tinymce": "^5.10.5",
     "vue": "^2.7.10",

+ 6 - 1
src/components/Dict/DictSelection.vue

@@ -56,6 +56,11 @@
       listFormatte: {
         type: Function,
         default: null
+      },
+      //列表使用了多个时,防止多次请求
+      isOne: {
+        type: Boolean,
+        default: true
       }
     },
     data() {
@@ -85,7 +90,7 @@
       }
     },
     created() {
-      if (this.dictName) {
+      if (this.dictName && this.isOne) {
         this.requestDict(this.dictName);
       }
     },

+ 3 - 1
src/enum/dict.js

@@ -78,7 +78,9 @@ export default {
   记录规则频率: 'record_rules_frequency',
   记录规则报工类型: 'record_rules_report_work_type',
   记录规则执行方式: 'record_rules_execute_method',
-  记录规则事项类型: 'record_rules_item_type'
+  记录规则事项类型: 'record_rules_item_type',
+  班次出勤名称: 'attendance_name',
+  班次时间类型: 'workShift_tiemType',
 };
 
 export const numberList = [

+ 7 - 1
src/styles/index.scss

@@ -184,4 +184,10 @@ $--ele-font-path: '~ele-admin/es/style/fonts';
     flex-flow: column-reverse nowrap;
     justify-content: center;
     align-items: center;
-  }
+  }
+
+  table th .is-required::before{
+    content: "*";
+    color: red;
+    margin-right: 4px;
+} 

+ 5 - 1
src/views/system/user/components/user-edit.vue

@@ -206,6 +206,9 @@
         this.$refs.addREf.open('0');
       },
       async getUserDetail() {
+        if (!this.form.mainUserId) {
+          return;
+        }
         this.userInfo = await getUserDetail(this.form.mainUserId);
       },
       userBk(data) {
@@ -283,10 +286,11 @@
         this.$emit('update:visible', value);
       },
       getByData(userRow, currentRow) {
+        // alert(1)
         let id = this.data?.id || userRow?.id;
         getById(id).then((res) => {
           this.form = res.data;
-          this.form.mainUserId = id;
+          // this.form.mainUserId = id;
           this.getUserDetail();
           this.form.groupRolePOList = [];
           res.data.groupRoleList.forEach((item) => {

+ 5 - 2
vue.config.js

@@ -38,8 +38,11 @@ module.exports = {
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
-        // target: 'http://192.168.1.116:18086',
-        target: 'http://192.168.1.251:18086',
+
+      
+        // target: 'http://192.168.1.251:18086', // 开发
+        target: 'http://192.168.1.127:18086', // 赵沙金
+
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {

+ 5 - 0
yarn.lock

@@ -5791,6 +5791,11 @@
   dependencies:
     "yallist" "^4.0.0"
 
+"lunar-calendar@^0.1.4":
+  "integrity" "sha512-5r87vbg5yg56z/jkf3A+Ur+ZggUTiJw1VATT9P7RELQgWcTNhfJ+OLkNYroSna6r65bMqyaAgapo9vRN40L75A=="
+  "resolved" "https://registry.npmmirror.com/lunar-calendar/-/lunar-calendar-0.1.4.tgz"
+  "version" "0.1.4"
+
 "make-dir@^3.0.2", "make-dir@^3.1.0":
   "integrity" "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw=="
   "resolved" "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz"