Просмотр исходного кода

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

tianxinyu 10 месяцев назад
Родитель
Сommit
de2f199def

+ 46 - 39
.vscode/settings.json

@@ -1,42 +1,49 @@
 {
-    //为了符合eslint的两个空格间隔原则
-    "editor.tabSize": 2,
-    //配置eslint
-    "files.autoSave":"off",
-    "editor.codeActionsOnSave": {
-      "source.fixAll": "explicit",
-      "source.fixAll.eslint": "explicit"
+  //为了符合eslint的两个空格间隔原则
+  "editor.tabSize": 2,
+  //配置eslint
+  "files.autoSave": "off",
+  "eslint.run": "onSave",
+  // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。
+  "workbench.editor.enablePreview": false,
+  "search.exclude": {
+    "**/dist": true,
+    "**/static": true
+  },
+  "workbench.colorCustomizations": {
+    "activityBar.background": "#332A3A",
+    "titleBar.activeBackground": "#473B52",
+    "titleBar.activeForeground": "#FBFAFB"
+  },
+  "eslint.enable": true,
+  "editor.codeActionsOnSave": {
+    "source.fixAll": true,
+    "source.fixAll.eslint": true
+  },
+  "editor.formatOnSave": false,
+  //  "rvest.vs-code-prettier-eslint"
+  "vetur.format.options.tabSize": 2,
+  "vetur.format.options.useTabs": false,
+  "vetur.format.defaultFormatterOptions": {
+    "prettier": {
+      "singleQuote": true,
+      "semi": false,
+      "trailingComma": "none",
+      "arrowParens": "avoid",
+      "printWidth": 100,
+      "bracketSpacing": true,
+      "htmlWhitespaceSensitivity": "ignore",
+
+      // 关键配置:函数名后添加空格
+      "spaceBeforeFunctionParen": true // 设置为 true 添加空格
     },
-    "eslint.run": "onSave",
-     // 控制是否将打开的编辑器显示为预览。预览编辑器将会重用至其被保留(例如,通过双击或编辑),且其字体样式将为斜体。
-    "workbench.editor.enablePreview": false,
-    "search.exclude": {
-      "**/dist": true,
-      "**/static": true
-    },
-    "workbench.colorCustomizations": {
-      "activityBar.background": "#332A3A",
-      "titleBar.activeBackground": "#473B52",
-      "titleBar.activeForeground": "#FBFAFB"
-    },
-    "eslint.enable": true,
-    "editor.codeActionsOnSave": {
-      "source.fixAll": true,
-      "source.fixAll.eslint": true
-    },
-    "editor.formatOnSave": true,
-    //  "rvest.vs-code-prettier-eslint"
-    "editor.defaultFormatter":{
-      "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
-      "editor.formatOnType": false, // required
-      "editor.formatOnPaste": true, // optional
-      "editor.formatOnSave": false, // optional
-      "editor.formatOnSaveMode": "file", // required to format on save
-      "files.autoSave": "onFocusChange", // optional but recommended
-      "vs-code-prettier-eslint.prettierLast": false // set as "true" to run 'prettier' last not first
-    },
-    "vetur.format.defaultFormatter.js": "prettier-eslint",
-    "[javascript]": {
-      "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
+    "stylus-supremacy": {
+      "insertColons": false,
+      "insertSemicolons": false
     }
-  }
+  },
+  // "vetur.format.defaultFormatter.js": "prettier-eslint",
+  "[javascript]": {
+    "editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
+  }
+}

+ 1 - 2
src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

@@ -205,8 +205,7 @@
                 :clearable="clearable"
                 :filterable="allowCreate"
                 :allow-create="allowCreate"
-                v-on="$listeners"
-                @change="selectLinkageChange"
+                v-on="{...$listeners, change: selectLinkageChange}"
             >
                 <el-option v-for="o in dataOptions" :key="o.val" :label="o.label" :value="o.val" />
             </el-select>

+ 14 - 6
src/views/component/trainingManage/index.vue

@@ -175,12 +175,12 @@ export default {
                 },
                 // 表格字段配置
                 columns: [
-                    { prop: 'id_', label: '姓名', width: 100, slotName: 'userIdSlot' },
-                    { prop: 'positions_', label: '部门', width: 120, slotName: 'positionIdSlot' },
-                    { prop: 'jian_ding_zi_ge_z', label: '工号', width: 140 },
-                    { prop: 'planedjoin', label: '应参训次数', width: 120 },
-                    { prop: 'truejoin', label: '实参训次数', width: 120 },
-                    { prop: 'participationRate', label: '参训率', width: 120 },
+                    { prop: 'id_', label: '姓名', width: 150, slotName: 'userIdSlot' },
+                    { prop: 'positions_', label: '部门', width: 400, slotName: 'positionIdSlot' },
+                    { prop: 'jian_ding_zi_ge_z', label: '工号', width: 150 },
+                    { prop: 'planedjoin', label: '应参训次数' },
+                    { prop: 'truejoin', label: '实参训次数' },
+                    { prop: 'participationRate', label: '参训率', width: 150 },
                     { label: '操作', width: 120, slotName: 'customButton' }
                 ]
             },
@@ -307,4 +307,12 @@ export default {
     }
 }
 </script>
+<style lang="scss" scoped>
 
+/* 可选:调整表单标签宽度 */
+::v-deep .el-form-item__label {
+  width: auto !important;
+ // min-width: 40px !important; /* 固定标签宽度使内容对齐 */
+  text-align: left;
+}
+</style>

+ 15 - 4
src/views/platform/job/list.vue

@@ -116,7 +116,10 @@ export default {
             height: document.clientHeight,
             logHeight: 600,
             listData: [],
-            pagination: {},
+            pagination: {
+                limit: 20,
+                page: 1
+            },
             sorts: {},
             listConfig: {
                 toolbars: [
@@ -163,7 +166,7 @@ export default {
                 rowHandle: {
                     actions: [{
                         key: 'remove'
-                    },{
+                    }, {
                         key: 'addTrigger',
                         icon: 'ibps-icon-add',
                         label: '添加计划'
@@ -213,14 +216,22 @@ export default {
             const page = {
                 requestPage: {
                     limit: this.pagination.limit || 20,
-                    pageNo: this.pagination.pageNo || 1
+                    pageNo: this.pagination.page || 1
                 }
             }
             queryPageList({
                 jobName,
                 group
             }, page).then(response => {
-                ActionUtils.handleListData(this, response.data)
+                const data = response.data
+                data.pageResult = {
+                    'limit': this.pagination.limit || 20,
+                    'page': this.pagination.page || 1,
+                    'totalCount': data.dataResult.length || 0,
+                    'totalPages': Math.ceil(data.dataResult.length / (this.pagination.limit || 20))
+                }
+                data.dataResult = data.dataResult.slice((this.pagination.page - 1) * this.pagination.limit, this.pagination.page * this.pagination.limit)
+                ActionUtils.handleListData(this, data)
                 this.loading = false
             }).catch(() => {
                 this.loading = false