Browse Source

工程派工

LR 2 years ago
parent
commit
8106dc439d

+ 159 - 90
.eslintrc.js

@@ -7,68 +7,100 @@ module.exports = {
   env: {
     browser: true,
     node: true,
-    es6: true,
+    es6: true
   },
   extends: ['plugin:vue/recommended', 'eslint:recommended'],
 
   // 在此处添加自定义规则
   //它是基于 https://github.com/vuejs/eslint-config-vue
   rules: {
-    "vue/max-attributes-per-line": [2, {
-      "singleline": 10,
-      "multiline": {
-        "max": 1,
-        "allowFirstLine": false
-      }
-    }],
-    "vue/singleline-html-element-content-newline": "off",
-    "vue/multiline-html-element-content-newline":"off",
-    "vue/name-property-casing": ["error", "PascalCase"],
-    "vue/no-v-html": "off",
+    'vue/max-attributes-per-line': [
+      2,
+      {
+        singleline: 10,
+        multiline: {
+          max: 1,
+          allowFirstLine: false
+        }
+      }
+    ],
+    'vue/singleline-html-element-content-newline': 'off',
+    'vue/multiline-html-element-content-newline': 'off',
+    'vue/name-property-casing': ['error', 'PascalCase'],
+    'vue/no-v-html': 'off',
     'accessor-pairs': 2,
-    'arrow-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
+    'arrow-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
     'block-spacing': [2, 'always'],
-    'brace-style': [2, '1tbs', {
-      'allowSingleLine': true
-    }],
-    'camelcase': [0, {
-      'properties': 'always'
-    }],
+    'brace-style': [
+      2,
+      '1tbs',
+      {
+        allowSingleLine: true
+      }
+    ],
+    camelcase: [
+      0,
+      {
+        properties: 'always'
+      }
+    ],
     'comma-dangle': [2, 'never'],
-    'comma-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
+    'comma-spacing': [
+      2,
+      {
+        before: false,
+        after: true
+      }
+    ],
     'comma-style': [2, 'last'],
     'constructor-super': 2,
-    'curly': [2, 'multi-line'],
+    curly: [2, 'multi-line'],
     'dot-location': [2, 'property'],
     'eol-last': 2,
-    'eqeqeq': ["error", "always", {"null": "ignore"}],
-    'generator-star-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
+    eqeqeq: ['error', 'always', { null: 'ignore' }],
+    'generator-star-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
     'handle-callback-err': [2, '^(err|error)$'],
-    'indent': [2, 2, {
-      'SwitchCase': 1
-    }],
+    indent: [
+      2,
+      2,
+      {
+        SwitchCase: 1
+      }
+    ],
     'jsx-quotes': [2, 'prefer-single'],
-    'key-spacing': [2, {
-      'beforeColon': false,
-      'afterColon': true
-    }],
-    'keyword-spacing': [2, {
-      'before': true,
-      'after': true
-    }],
-    'new-cap': [2, {
-      'newIsCap': true,
-      'capIsNew': false
-    }],
+    'key-spacing': [
+      2,
+      {
+        beforeColon: false,
+        afterColon: true
+      }
+    ],
+    'keyword-spacing': [
+      2,
+      {
+        before: true,
+        after: true
+      }
+    ],
+    'new-cap': [
+      2,
+      {
+        newIsCap: true,
+        capIsNew: false
+      }
+    ],
     'new-parens': 2,
     'no-array-constructor': 2,
     'no-caller': 2,
@@ -99,17 +131,23 @@ module.exports = {
     'no-irregular-whitespace': 2,
     'no-iterator': 2,
     'no-label-var': 2,
-    'no-labels': [2, {
-      'allowLoop': false,
-      'allowSwitch': false
-    }],
+    'no-labels': [
+      2,
+      {
+        allowLoop: false,
+        allowSwitch: false
+      }
+    ],
     'no-lone-blocks': 2,
     'no-mixed-spaces-and-tabs': 2,
     'no-multi-spaces': 2,
     'no-multi-str': 2,
-    'no-multiple-empty-lines': [2, {
-      'max': 1
-    }],
+    'no-multiple-empty-lines': [
+      2,
+      {
+        max: 1
+      }
+    ],
     'no-native-reassign': 2,
     'no-negated-in-lhs': 2,
     'no-new-object': 2,
@@ -137,62 +175,93 @@ module.exports = {
     'no-undef-init': 2,
     'no-unexpected-multiline': 2,
     'no-unmodified-loop-condition': 2,
-    'no-unneeded-ternary': [2, {
-      'defaultAssignment': false
-    }],
+    'no-unneeded-ternary': [
+      2,
+      {
+        defaultAssignment: false
+      }
+    ],
     'no-unreachable': 2,
     'no-unsafe-finally': 2,
-    'no-unused-vars': [2, {
-      'vars': 'all',
-      'args': 'none'
-    }],
+    'no-unused-vars': [
+      2,
+      {
+        vars: 'all',
+        args: 'none'
+      }
+    ],
     'no-useless-call': 2,
     'no-useless-computed-key': 2,
     'no-useless-constructor': 2,
     'no-useless-escape': 0,
     'no-whitespace-before-property': 2,
     'no-with': 2,
-    'one-var': [2, {
-      'initialized': 'never'
-    }],
-    'operator-linebreak': [2, 'after', {
-      'overrides': {
-        '?': 'before',
-        ':': 'before'
-      }
-    }],
+    'one-var': [
+      2,
+      {
+        initialized: 'never'
+      }
+    ],
+    'operator-linebreak': [
+      2,
+      'after',
+      {
+        overrides: {
+          '?': 'before',
+          ':': 'before'
+        }
+      }
+    ],
     'padded-blocks': [2, 'never'],
-    'quotes': [2, 'single', {
-      'avoidEscape': true,
-      'allowTemplateLiterals': true
-    }],
-    'semi': [2, 'never'],
-    'semi-spacing': [2, {
-      'before': false,
-      'after': true
-    }],
+    quotes: [
+      2,
+      'single',
+      {
+        avoidEscape: true,
+        allowTemplateLiterals: true
+      }
+    ],
+    semi: [2, 'never'],
+    'semi-spacing': [
+      2,
+      {
+        before: false,
+        after: true
+      }
+    ],
     'space-before-blocks': [2, 'always'],
     'space-before-function-paren': [2, 'never'],
     'space-in-parens': [2, 'never'],
     'space-infix-ops': 2,
-    'space-unary-ops': [2, {
-      'words': true,
-      'nonwords': false
-    }],
-    'spaced-comment': [2, 'always', {
-      'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
-    }],
+    'space-unary-ops': [
+      2,
+      {
+        words: true,
+        nonwords: false
+      }
+    ],
+    'spaced-comment': [
+      2,
+      'always',
+      {
+        markers: ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
+      }
+    ],
     'template-curly-spacing': [2, 'never'],
     'use-isnan': 2,
     'valid-typeof': 2,
     'wrap-iife': [2, 'any'],
     'yield-star-spacing': [2, 'both'],
-    'yoda': [2, 'never'],
+    yoda: [2, 'never'],
     'prefer-const': 2,
     'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
-    'object-curly-spacing': [2, 'always', {
-      objectsInObjects: false
-    }],
+    'object-curly-spacing': [
+      2,
+      'always',
+      {
+        objectsInObjects: true
+      }
+    ],
     'array-bracket-spacing': [2, 'never']
   }
 }

+ 14 - 0
.prettierrc.js

@@ -0,0 +1,14 @@
+module.exports = {
+  printWidth: 120, // 换行字符串阈值
+  tabWidth: 2, // 设置工具每一个水平缩进的空格数
+  useTabs: false,
+  semi: false, // 句末是否加分号
+  vueIndentScriptAndStyle: true,
+  singleQuote: true, // 用单引号
+  trailingComma: 'none', // 最后一个对象元素加逗号
+  bracketSpacing: true, // 对象,数组加空格
+  jsxBracketSameLine: true, // jsx > 是否另起一行
+  arrowParens: 'always', // (x) => {} 是否要有小括号
+  requirePragma: false, // 不需要写文件开头的 @prettier
+  insertPragma: false // 不需要自动在文件开头插入 @prettier
+}

+ 4 - 0
src/api/waterProductionCost/assign.js

@@ -0,0 +1,4 @@
+import axios from '@/utils/request'
+
+export const fetchAssignPage = (params) =>
+  axios.request({ url: '/tofly-flow/tfprojectdispatchw/page', method: 'get', params })

+ 148 - 164
src/components/projectCom/table/index.vue

@@ -2,43 +2,33 @@
   <!-- 本组件用于table台账的显示 -->
   <div class="tableDiv">
     <el-table
+      ref="table1"
       class="tableCom"
       :cell-class-name="this.startCellClass ? setCellClass : ''"
       :row-class-name="tableRowClassName"
       :data="dataList"
-      @row-dblclick="rowDblclick"
-      @row-click="rowClick"
-      @select="selectRow"
-      @select-all="selectRow"
       style="width: 100%"
-      ref="table1"
       height="calc(100% - 66px)"
       stripe
       highlight-current-row
+      @row-dblclick="rowDblclick"
+      @row-click="rowClick"
+      @select="selectRow"
+      @select-all="selectRow"
     >
       <template slot="empty">
         <img src="@/assets/icon/null.png" alt="" />
         <p class="empty-p">暂无数据</p>
       </template>
-      <el-table-column
-        align="center"
-        v-if="config.check"
-        type="selection"
-        width="55"
-      />
-      <el-table-column
-        align="center"
-        v-if="config.index"
-        type="index"
-        width="50"
-        label="序号"
-      />
+      <el-table-column v-if="config.check" align="center" type="selection" width="55" />
+      <el-table-column v-if="config.index" align="center" type="index" width="50" label="序号" />
       <template v-for="(item, index) in config.fieldList">
         <el-table-column
+          :key="currentDate + 'header_' + index"
           align="center"
           :prop="item.field"
           :width="item.width ? item.width : ''"
-          :key="currentDate + 'header_' + index"
+          :min-width="item.minWidth"
           :formatter="formatter"
           sortable
           :label="item.label"
@@ -49,19 +39,13 @@
           </template>
         </el-table-column>
       </template>
-      <el-table-column
-        fixed="right"
-        align="center"
-        v-if="config.actionList"
-        label="操作"
-        width="150"
-      >
+      <el-table-column v-if="config.actionList" fixed="right" align="center" label="操作" width="150">
         <template slot-scope="scope">
           <template v-for="(item, index) in config.actionList">
             <el-button
+              :key="currentDate + 'scope_' + index"
               type="text"
               :class="item.class"
-              :key="currentDate + 'scope_' + index"
               size="small"
               @click="item.method(scope.row)"
               >{{ item.label }}</el-button
@@ -78,100 +62,103 @@
         :page-sizes="[10, 20, 30, 50, 100, 1000]"
         :page-size="size"
         :current-page="current"
+        :total="total"
         @size-change="changeSize"
         @current-change="changecurrent"
-        :total="total"
       />
     </el-row>
   </div>
 </template>
 
 <script>
-import commonMe from "@/utils/common.js";
+import commonMe from '@/utils/common.js'
 export default {
   props: {
     config: {
-      check: true, //是否展示选中框
-      index: true, //是否展示序号
-      // dataList:[],//同步数据
-      testData: false, //是否使用测试数据
-      fieldList: [
-        {
-          label: "公司", //表头显示
-          field: "company", //对应的字段
-          setCellClassMethod: (e) => {}, //通过设置cell的类名来改变cell的显示
-          actionMethod: (e) => {}, //点击时的事件
-        },
-        {
-          label: "部门", //表头显示
-          field: "department", //对应的字段
-          setCellClassMethod: (e) => {}, //通过设置cell的类名来改变cell的显示
-          actionMethod: (e) => {}, //点击时的事件
-        },
-        {
-          label: "姓名", //表头显示
-          field: "user", //对应的字段
-          setCellClassMethod: (e) => {}, //通过设置cell的类名来改变cell的显示
-          actionMethod: (e) => {}, //点击时的事件
-        },
-      ], //对应的字段列表
-      actionList: [
-        {
-          label: "处理", //展示标签
-          method: (e) => {}, //触发的方法
-        },
-      ], //每列的一些操作
-      searchDate: {}, //查询条件(除开翻页以外的其它查询条件)
-      method: (e) => {}, //获取数据的方法
-      click: (e) => {}, //单击事件
-      dbClick: (e) => {}, //双击方法
-      selectClick: (e) => {}, //选中事件
-    },
+      type: Object,
+      default: () => ({
+        check: true, // 是否展示选中框
+        index: true, // 是否展示序号
+        // dataList:[],//同步数据
+        testData: false, // 是否使用测试数据
+        fieldList: [
+          {
+            label: '公司', // 表头显示
+            field: 'company', // 对应的字段
+            setCellClassMethod: (e) => {}, // 通过设置cell的类名来改变cell的显示
+            actionMethod: (e) => {} // 点击时的事件
+          },
+          {
+            label: '部门', // 表头显示
+            field: 'department', // 对应的字段
+            setCellClassMethod: (e) => {}, // 通过设置cell的类名来改变cell的显示
+            actionMethod: (e) => {} // 点击时的事件
+          },
+          {
+            label: '姓名', // 表头显示
+            field: 'user', // 对应的字段
+            setCellClassMethod: (e) => {}, // 通过设置cell的类名来改变cell的显示
+            actionMethod: (e) => {} // 点击时的事件
+          }
+        ], // 对应的字段列表
+        actionList: [
+          {
+            label: '处理', // 展示标签
+            method: (e) => {} // 触发的方法
+          }
+        ], // 每列的一些操作
+        searchDate: {}, // 查询条件(除开翻页以外的其它查询条件)
+        method: (e) => {}, // 获取数据的方法
+        click: (e) => {}, // 单击事件
+        dbClick: (e) => {}, // 双击方法
+        selectClick: (e) => {} // 选中事件
+      })
+    }
   },
   data() {
     return {
-      testDataList: [], //存储的测试数据
-      dataList: [], //展示的数据列表
-      total: 0, //总共的数据
-      currentDate: "", //当前的时间点
-      current: 1, //当前页
-      size: 30, //当前一页多少数据
-      formatter: commonMe.formatter, //表格数据的过滤
-      checkRow: [], //选择的行数
-      currentRow: null, //当前所在的行数
-      startCellClass: false, //是否开启cell类设置方法
-      cellClassList: [], //保存cell设设置的相关方法
-    };
+      testDataList: [], // 存储的测试数据
+      dataList: [], // 展示的数据列表
+      total: 0, // 总共的数据
+      currentDate: '', // 当前的时间点
+      current: 1, // 当前页
+      size: 30, // 当前一页多少数据
+      formatter: commonMe.formatter, // 表格数据的过滤
+      checkRow: [], // 选择的行数
+      currentRow: null, // 当前所在的行数
+      startCellClass: false, // 是否开启cell类设置方法
+      cellClassList: [] // 保存cell设设置的相关方法
+    }
   },
   created() {
-    this.currentDate = commonMe.getCurrentDateToMS() + "";
+    this.currentDate = commonMe.getCurrentDateToMS() + ''
   },
   mounted() {
-    this.startCellClassMethod();
+    this.startCellClassMethod()
     if (this.config.testData) {
-      this.getTestData();
+      this.getTestData()
     } else {
-      this.getTableData();
+      this.getTableData()
     }
-    this.setTableInfo();
+    this.setTableInfo()
   },
   methods: {
-    //翻页改变
+    // 翻页改变
     changecurrent(data) {
-      this.current = data;
+      this.current = data
       if (this.config.testData) {
-        this.getCurrentTestData();
+        this.getCurrentTestData()
       } else {
-        this.getTableData();
+        this.getTableData()
       }
     },
-    //页数
+    // 页数
     changeSize(data) {
-      this.size = data;
+      this.size = data
       if (this.config.testData) {
-        this.getCurrentTestData();
+        this.getCurrentTestData()
       } else {
-        this.getTableDataByOne();
+        this.getTableDataByOne()
       }
     },
 
@@ -180,7 +167,7 @@ export default {
      * @param data 是否将页面重置为1
      */
     getTableDataByOne() {
-      if (this.config) this.getTableData(true);
+      if (this.config) this.getTableData(true)
     },
 
     /**
@@ -190,48 +177,48 @@ export default {
     getTableData(data) {
       console.log('更新数据')
       if (data) {
-        this.current = 1;
+        this.current = 1
       }
       if (this.config.method) {
         const searchData = {
           size: this.size,
-          current: this.current,
-        };
+          current: this.current
+        }
         this.config
           .method(commonMe.notJsonCopy(searchData))
           .then((res) => {
-            this.dataList = res.records || [];
-            this.total = Number(res.total) || 0;
-            this.reSetTableInfo();
-
+            this.dataList = res.records || []
+            this.total = Number(res.total) || 0
+            this.reSetTableInfo()
           })
           .catch((err) => {
-            this.dataList = [];
-            this.total = 0;
-            this.reSetTableInfo();
-            console.log(err);
-          });
+            this.dataList = []
+            this.total = 0
+            this.reSetTableInfo()
+            console.log(err)
+          })
       }
     },
     /**
      * 更新表格数据
      * @param params 界面查询参数
      */
-    update (params = {}) {
+    update(params = {}) {
       if (this.config.method) {
-        let pageAndSize = { size: this.size, current: 1 }
-        this.config.method(commonMe.notJsonCopy({ ...params, ...pageAndSize }))
-        .then(res => {
-            this.dataList = res.records || [];
-            this.total = Number(res.total) || 0;
-            this.reSetTableInfo();
-        })
-        .catch((err) => {
-          this.dataList = [];
-          this.total = 0;
-          this.reSetTableInfo();
-          console.log(err);
-        });
+        const pageAndSize = { size: this.size, current: 1 }
+        this.config
+          .method(commonMe.notJsonCopy({ ...params, ...pageAndSize }))
+          .then((res) => {
+            this.dataList = res.records || []
+            this.total = Number(res.total) || 0
+            this.reSetTableInfo()
+          })
+          .catch((err) => {
+            this.dataList = []
+            this.total = 0
+            this.reSetTableInfo()
+            console.log(err)
+          })
       }
     },
 
@@ -240,64 +227,64 @@ export default {
      */
     selectRow(data) {
       console.log('选择的信息')
-      this.checkRow = data;
-      this.setTableInfo();
+      this.checkRow = data
+      this.setTableInfo()
       this.$nextTick((e) => {
         if (this.config.selectClick) {
-          this.config.selectClick(data);
+          this.config.selectClick(data)
         }
-      });
+      })
     },
 
     /**
      * 单击选中的行
      * */
     rowClick(data) {
-      this.currentRow = data;
-      this.setTableInfo();
+      this.currentRow = data
+      this.setTableInfo()
       this.$nextTick((e) => {
         if (this.config.click) {
-          this.config.click(data);
+          this.config.click(data)
         }
-      });
+      })
     },
 
     /**
      * 双击选中的行
      * */
     rowDblclick(data) {
-      this.currentRow = data;
-      this.setTableInfo();
+      this.currentRow = data
+      this.setTableInfo()
       this.$nextTick((e) => {
         if (this.config.dbClick) {
-          this.config.dbClick(data);
+          this.config.dbClick(data)
         }
-      });
+      })
     },
 
     /**
      * 重置table的值
      * */
     reSetTableInfo() {
-      this.currentRow = [];
-      this.checkRow = null;
-      this.setTableInfo();
-      this.$refs['table1'].doLayout();
+      this.currentRow = []
+      this.checkRow = null
+      this.setTableInfo()
+      this.$refs['table1'].doLayout()
     },
 
     /**
      * 更新table返回的值
      * */
     setTableInfo() {
-      let tableData = commonMe.notJsonCopy(this.dataList)
+      const tableData = commonMe.notJsonCopy(this.dataList)
       const config = {
         currentRow: commonMe.notJsonCopy(this.currentRow),
         checkRow: commonMe.notJsonCopy(this.checkRow),
         size: commonMe.notJsonCopy(this.size),
         current: commonMe.notJsonCopy(this.current),
         tableData
-      };
-      this.$emit("input", config);
+      }
+      this.$emit('input', config)
     },
 
     /**
@@ -305,13 +292,13 @@ export default {
      * @param  data 渲染的cell元素
      */
     startCellClassMethod() {
-      this.cellClassList = [];
+      this.cellClassList = []
       this.config.fieldList.forEach((item) => {
         if (item.setCellClassMethod) {
-          this.startCellClass = true;
-          this.cellClassList[item.field] = item.setCellClassMethod;
+          this.startCellClass = true
+          this.cellClassList[item.field] = item.setCellClassMethod
         }
-      });
+      })
     },
 
     /**
@@ -319,9 +306,9 @@ export default {
      * @param  data 渲染的cell元素
      */
     setCellClass(data) {
-      const field = data.column.property || "";
+      const field = data.column.property || ''
       if (this.cellClassList[field]) {
-        return this.cellClassList[field](data);
+        return this.cellClassList[field](data)
       }
     },
 
@@ -330,44 +317,41 @@ export default {
      * */
     tableRowClassName({ row, rowIndex }) {
       if (rowIndex % 2 == 0) {
-        return "rowEven";
+        return 'rowEven'
       } else {
-        return "rowOdd";
+        return 'rowOdd'
       }
-      return "";
     },
 
     /**
      * 生成测试数据
      */
     getTestData() {
-      const testData = [];
+      const testData = []
       for (let i = 0; i < 100; i++) {
-        const testItem = {};
-        this.config.fieldList.forEach((item) => {
-          testItem[item.field] = item.label + "" + i;
-        });
-        testData.push(testItem);
+        const testItem = {}
+        this.config.fieldLit.forEach((item) => {
+          testItem[item.field] = item.label + '' + i
+        })
+        ;('')
+        tetData.push(testItem)
       }
-      this.testDataList = testData;
-      this.total = this.testDataList.length;
-      this.getCurrentTestData();
+      this.testDataList = testData
+      this.total = this.testDataLit.length
+      this.getCurrentTestData()
     },
 
     /**
      * 获取当前测试数据
      */
     getCurrentTestData() {
-      this.dataList = this.testDataList.slice(
-        (this.current - 1) * this.size,
-        this.size
-      );
-    },
-  },
-};
+      this.dataList = this.testDataList.slice((this.current - 1) * this.size, this.size)
+    }
+  }
+}
 </script>
 <style lang="scss" scoped>
-@import "./src/assets/default";
+@import './src/assets/default';
 /deep/.tableCom {
   @include queryTableRowStyle;
   .rowEven {
@@ -382,7 +366,7 @@ export default {
       background: rgba(0, 0, 0, 0) !important;
     }
   }
-  .el-table__body tr.current-row>td.el-table__cell {
+  .el-table__body tr.current-row > td.el-table__cell {
     background-color: #ecf5ff !important;
     transform: none;
   }
@@ -438,4 +422,4 @@ export default {
     color: #2d74e7 !important;
   }
 }
-</style>
+</style>

+ 64 - 64
src/views/zhpt/projectManager/newInstall/proDispatch/addDispatch/detailPage.vue

@@ -1,99 +1,99 @@
 <template>
   <div class="testDiv" style="width: 100%; height: 100%; padding: 8px">
     <inputLegend :label="'工程信息'" isopen="true">
-      <proNews></proNews>
+      <proNews />
     </inputLegend>
     <inputLegend :label="'工程派工'" isopen="true">
-      <lookForm :config="config1"></lookForm>
+      <lookForm :config="config1" />
     </inputLegend>
     <inputLegend :label="'材料信息'" isopen="true">
       <div style="margin: 0 0 10px">
         <tftransfer ref="Tftransfer" />
       </div>
-      <lookForm :config="config2"></lookForm>
+      <lookForm :config="config2" />
     </inputLegend>
     <inputLegend :label="'下一环节处理'" isopen="true">
-      <lookForm :config="config3"></lookForm>
+      <lookForm :config="config3" />
     </inputLegend>
   </div>
 </template>
 
 <script>
 // import flowMap from "@/components/flowMap/mainFlow.vue";
-import lookForm from "@/components/projectCom/lookForm/index.vue";
-import inputLegend from "@/components/projectCom/legend/index.vue";
-import proNews from "@/components/projectCom/proNews/index.vue";
-import tftransfer from "@/components/projectCom/TFtransfer/TFuserMat";
-import commonMe from "@/utils/common.js";
+import lookForm from '@/components/projectCom/lookForm/index.vue'
+import inputLegend from '@/components/projectCom/legend/index.vue'
+import proNews from '@/components/projectCom/proNews/index.vue'
+import tftransfer from '@/components/projectCom/TFtransfer/TFuserMat'
+// import commonMe from '@/utils/common.js'
 export default {
-  name: "wxCheck",
+  name: 'WxCheck',
   components: { lookForm, proNews, inputLegend, tftransfer },
   data() {
     return {
       config1: {
-        data: {}, //原始数据
+        data: {}, // 原始数据
         showfield: [
           {
             group: [
               {
-                field: "proNature", //存储字段
-                label: "工程性质", //显示标签
+                field: 'proNature', // 存储字段
+                label: '工程性质' // 显示标签
               },
               {
-                field: "CompulWork", //存储字段
-                label: "强制工序", //显示标签
+                field: 'CompulWork', // 存储字段
+                label: '强制工序' // 显示标签
               },
               {
-                field: "dispatchData", //存储字段
-                label: "派工日期", //显示标签
+                field: 'dispatchData', // 存储字段
+                label: '派工日期' // 显示标签
               },
               {
-                field: "sgCompany", //存储字段
-                label: "施工单位", //显示标签
+                field: 'sgCompany', // 存储字段
+                label: '施工单位' // 显示标签
               },
               {
-                field: "jlCompany", //存储字段
-                label: "监理单位", //显示标签
+                field: 'jlCompany', // 存储字段
+                label: '监理单位' // 显示标签
               },
               {
-                field: "designSituat", //存储字段
-                label: "工程任务主要内容", //显示标签
-                type: "area",
+                field: 'designSituat', // 存储字段
+                label: '工程任务主要内容', // 显示标签
+                type: 'area'
               },
               {
-                field: "isGet", //存储字段
-                label: "是否需要领料", //显示标签
-              },
-            ],
-          },
-        ],
+                field: 'isGet', // 存储字段
+                label: '是否需要领料' // 显示标签
+              }
+            ]
+          }
+        ]
       },
       config2: {
-        data: {}, //原始数据
+        data: {}, // 原始数据
         showfield: [
           {
             group: [
               {
-                field: "note", //存储字段
-                label: "备注", //显示标签
-                type: "area",
+                field: 'note', // 存储字段
+                label: '备注', // 显示标签
+                type: 'area'
               },
               {
-                field: "registerDept", //存储字段
-                label: "操作部门", //显示标签
+                field: 'registerDept', // 存储字段
+                label: '操作部门' // 显示标签
               },
               {
-                field: "registerStaffName", //存储字段
-                label: "操作人", //显示标签
+                field: 'registerStaffName', // 存储字段
+                label: '操作人' // 显示标签
               },
               {
-                field: "registerTime", //存储字段
-                label: "操作时间", //显示标签
+                field: 'registerTime', // 存储字段
+                label: '操作时间' // 显示标签
               },
               {
-                field: "file", //存储字段
-                type: "file", //类型,不写入此参数则默认是text
-                label: "附件", //显示标签
+                field: 'file', // 存储字段
+                type: 'file', // 类型,不写入此参数则默认是text
+                label: '附件' // 显示标签
                 // onlyFile:'',//只能上传的文件
                 // config:{
                 //   fileList:[
@@ -103,42 +103,42 @@ export default {
                 //     // }
                 //   ]
                 // }
-              },
-            ],
-          },
-        ],
+              }
+            ]
+          }
+        ]
       },
       config3: {
-        data: {}, //原始数据
+        data: {}, // 原始数据
         showfield: [
           {
             group: [
               {
-                field: "nextNode", //存储字段
-                label: "下一环节", //显示标签
+                field: 'nextNode', // 存储字段
+                label: '下一环节' // 显示标签
               },
               {
-                field: "nextDepartment", //存储字段
-                label: "下一环节处理岗位", //显示标签
+                field: 'nextDepartment', // 存储字段
+                label: '下一环节处理岗位' // 显示标签
               },
               {
-                field: "nextHandleUser", //存储字段
-                label: "下一环节处理人", //显示标签
-              },
-            ],
-          },
-        ],
-      },
-    };
+                field: 'nextHandleUser', // 存储字段
+                label: '下一环节处理人' // 显示标签
+              }
+            ]
+          }
+        ]
+      }
+    }
   },
-  mounted: function () {},
   watch: {},
+  mounted: function() {},
   created() {},
   destroyed() {},
-  methods: {},
-};
+  methods: {}
+}
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .testDiv {
   /deep/.hasValue span {
     color: red !important;

+ 182 - 175
src/views/zhpt/projectManager/newInstall/proDispatch/addDispatch/index.vue

@@ -1,264 +1,271 @@
 <template>
-  <div
-    class="pageContentDiv"
-    style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px"
-  >
-    <el-row class="searchDiv" ref="searchDiv">
-      <searchCom v-model="searchCom"></searchCom>
-      <selectList
-        :config="userTypeConfig"
-        v-model="search.userType"
-      ></selectList>
-      <timeSelect v-model="timeSelect" title="缴费日期"></timeSelect>
-      <selectList :config="stateConfig" v-model="search.state"></selectList>
-      <el-button type="primary" size="small" @click="searchData"
-        >搜索</el-button
-      >
+  <div class="pageContentDiv" style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px">
+    <el-row ref="searchDiv" class="searchDiv">
+      <searchCom v-model="searchCom" />
+      <selectList v-model="search.userType" :config="userTypeConfig" />
+      <timeSelect v-model="timeSelect" title="缴费日期" />
+      <selectList v-model="search.state" :config="stateConfig" />
+      <el-button type="primary" size="small" @click="searchData">搜索</el-button>
       <el-button type="primary" size="small" @click="addData">添加</el-button>
       <!-- <el-button type="primary" size="small" @click="lookInfo">详情</el-button> -->
     </el-row>
-    <div
-      :style="
-        'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'
-      "
-    >
+    <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
       <tableCom
         v-if="tableConfig.method || tableConfig.testData"
         ref="tableCom"
         v-model="tableInfo"
         :config="tableConfig"
-      ></tableCom>
+      />
     </div>
-    <subFlowInfo
-      v-if="flowShow"
-      :config="config"
-      v-model="flowShow"
-      :title="title"
-    ></subFlowInfo>
+    <subFlowInfo v-if="flowShow" v-model="flowShow" :config="config" :title="title" />
   </div>
 </template>
 
 <script>
-import searchCom from "@/components/projectCom/searchCom/index.vue";
-import timeSelect from "@/components/projectCom/timeSelect/index.vue";
-import selectList from "@/components/projectCom/select/index.vue";
-import tableCom from "@/components/projectCom/table/index.vue";
-import inputCom from "@/components/projectCom/input/index.vue";
-import { xjTypeQuery } from "@/api/xjConfigManageApi";
-import commonMe from "@/utils/common.js";
+import searchCom from '@/components/projectCom/searchCom/index.vue'
+import timeSelect from '@/components/projectCom/timeSelect/index.vue'
+import selectList from '@/components/projectCom/select/index.vue'
+import tableCom from '@/components/projectCom/table/index.vue'
+// import inputCom from '@/components/projectCom/input/index.vue'
+import commonMe from '@/utils/common.js'
+import { fetchAssignPage } from '@/api/waterProductionCost/assign'
 // import subFlowInfo from "@/views/zhpt/projectManager/newInstall/subFlowInfo/index.vue";
-import detailPage from "./detailPage.vue";
-import inputPage from "./inputPage.vue";
+// import detailPage from './detailPage.vue'
+// import inputPage from './inputPage.vue'
 export default {
-  name: "addDispatch",
+  name: 'AddDispatch',
   components: {
     timeSelect,
     selectList,
     tableCom,
-    inputCom,
-    detailPage,
-    inputPage,
+    // inputCom,
+    // detailPage,
+    // inputPage,
     searchCom,
-    subFlowInfo: () =>
-      import("@/views/zhpt/projectManager/newInstall/subFlowInfo/index.vue"),
+    subFlowInfo: () => import('@/views/zhpt/projectManager/newInstall/subFlowInfo/index.vue')
   },
-  props: { data: Object },
+  props: { data: { type: Object, default: () => ({}) } },
   data() {
     return {
-      rowHeight: 0, //查询栏的高度
+      rowHeight: 0, // 查询栏的高度
       config: {
-        mainFlow: "proDispatch", //注册流程
-        subFlow: "addDispatch", //当前是登记环节
-        isEdit: false, //操作还是编辑
-        data: null, //操作行
+        mainFlow: 'proDispatch', // 注册流程
+        subFlow: 'addDispatch', // 当前是登记环节
+        isEdit: false, // 操作还是编辑
+        data: null // 操作行
       },
       timeSelect: [],
-      title: "",
+      title: '',
       searchCom: {},
       search: {
-        //查询条件(除开翻页以外的其它查询条件)
-        userType: null, //用户类型
-        projectLink: "", //工程环节
-        state: "", //工程状态
+        // 查询条件(除开翻页以外的其它查询条件)
+        userType: null, // 用户类型
+        projectLink: '', // 工程环节
+        state: '' // 工程状态
       },
-      flowShow: false, //输入页面显示控制
+      flowShow: false, // 输入页面显示控制
       userTypeConfig: {
-        //用户类型下拉框配置
+        // 用户类型下拉框配置
         // multiple:true,//是否多选
-        label: "用户类型",
+        label: '用户类型',
         // searchData:{//查询条件
         //   current:1,
         //   size:1000
         // },
         // method:e=>{},//获取数据的方法
-        data: [
-          {
-            id: "1",
-            label: "用户1",
-          },
-          {
-            id: "2",
-            label: "用户2",
-          },
-        ], //下拉数据
+        data: [{ id: '1', label: '用户1' }, { id: '2', label: '用户2' }], // 下拉数据
         field: {
-          id: "id", //id代表的字段
-          label: "label", //label的字段
-        },
+          id: 'id', // id代表的字段
+          label: 'label' // label的字段
+        }
       },
       stateConfig: {
         // multiple:true,//是否多选
-        label: "流程状态",
+        label: '流程状态',
         // searchData:{//查询条件
         //   current:1,
         //   size:1000
         // },
         // method:e=>{},//获取数据的方法
-        data: [], //下拉数据
+        data: [], // 下拉数据
         field: {
-          id: "id", //id代表的字段
-          label: "label", //label的字段
-        },
+          id: 'id', // id代表的字段
+          label: 'label' // label的字段
+        }
       },
-      tableInfo: {}, //table相关的一些信息,如当前选择的行数,当前双击的信息等
+      tableInfo: {}, // table相关的一些信息,如当前选择的行数,当前双击的信息等
       tableConfig: {
-        check: true, //是否展示选中框
-        testData: true, //是否使用测试数据
-        index: true, //是否展示序号
+        check: true, // 是否展示选中框
+        testData: false, // 是否使用测试数据
+        index: true, // 是否展示序号
         fieldList: [
-          //对应的字段列表
+          // 对应的字段列表
           {
-            label: "工程编号", //表头显示
-            field: "proNum", //对应的字段
+            label: '工程编号', // 表头显示
+            field: 'proNum', // 对应的字段
+            width: '100px'
           },
           {
-            label: "工程名称", //表头显示
-            field: "proName", //对应的字段
+            label: '工程名称', // 表头显示
+            field: 'proName', // 对应的字段
+            width: '100px'
           },
           {
-            label: "工程地址", //表头显示
-            field: "address", //对应的字段
+            label: '工程地址', // 表头显示
+            field: 'address', // 对应的字段
+            width: '100px'
           },
           {
-            label: "用户类型", //表头显示
-            field: "userType", //对应的字段
+            label: '用户类型', // 表头显示
+            field: 'userType', // 对应的字段
+            minWidth: '100px'
           },
           {
-            label: "项目负责人", //表头显示
-            field: "prejPerson", //对应的字段
+            label: '项目负责人', // 表头显示
+            field: 'prejPerson', // 对应的字段
+            minWidth: '120px'
           },
           {
-            label: "缴费日期", //表头显示
-            field: "payData", //对应的字段
+            label: '缴费日期', // 表头显示
+            field: 'payData', // 对应的字段
+            minWidth: '100px'
           },
           {
-            label: "已缴费(元)", //表头显示
-            field: "payPrice", //对应的字段
+            label: '已缴费(元)', // 表头显示
+            field: 'payPrice', // 对应的字段
+            minWidth: '130px'
           },
           {
-            label: "工程性质", //表头显示
-            field: "proNature", //对应的字段
+            label: '工程性质', // 表头显示
+            field: 'proNature', // 对应的字段
+            minWidth: '100px'
           },
           {
-            label: "派工日期", //表头显示
-            field: "dispatchData", //对应的字段
+            label: '派工日期', // 表头显示
+            field: 'dispatchData', // 对应的字段
+            minWidth: '100px'
           },
           {
-            label: "当前节点", //表头显示
-            field: "currentNode", //对应的字段
+            label: '当前节点', // 表头显示
+            field: 'currentNode', // 对应的字段
+            width: '100px'
           },
           {
-            label: "当前处理人", //表头显示
-            field: "currentPerson", //对应的字段
+            label: '当前处理人', // 表头显示
+            field: 'currentPerson', // 对应的字段
+            width: '120px'
           },
           {
-            label: "超期日期", //表头显示
-            field: "handleDay", //对应的字段
+            label: '超期日期', // 表头显示
+            field: 'handleDay', // 对应的字段
+            width: '120px',
             setCellClassMethod: (e) => {
-              //通过设置cell的类名来改变cell的显示
-              const value = e.row[e.column["property"]];
+              // 通过设置cell的类名来改变cell的显示
+              // const value = e.row[e.column['property']]
               if (e.rowIndex % 2) {
-                return "overtime";
+                return 'overtime'
               } else {
-                return "notOvertime";
+                return 'notOvertime'
               }
-            },
+            }
           },
           {
-            label: "流程状态", //表头显示
-            field: "state", //对应的字段
+            label: '流程状态', // 表头显示
+            field: 'state', // 对应的字段
+            width: '100px',
             setCellClassMethod: (e) => {
-              //通过设置cell的类名来改变cell的显示
-              const value = e.row[e.column["property"]];
-              if (e.rowIndex % 4 == 0) {
-                return "notCom";
-              } else if (e.rowIndex % 4 == 1) {
-                return "wait"; //待发起
-              } else if (e.rowIndex % 4 == 2) {
-                return "inHand"; //处理中
+              // 通过设置cell的类名来改变cell的显示
+              // const value = e.row[e.column['property']]
+              if (e.rowIndex % 4 === 0) {
+                return 'notCom'
+              } else if (e.rowIndex % 4 === 1) {
+                return 'wait' // 待发起
+              } else if (e.rowIndex % 4 === 2) {
+                return 'inHand' // 处理中
               } else {
-                return "finished";
+                return 'finished'
               }
-            },
+            }
+          },
+          {
+            label: '所属公司', // 表头显示
+            field: 'company', // 对应的字段
+            width: '100px'
+          },
+          {
+            label: '发起部门', // 表头显示
+            field: 'creatDepartment', // 对应的字段
+            width: '100px'
           },
           {
-            label: "所属公司", //表头显示
-            field: "company", //对应的字段
+            label: '发起人', // 表头显示
+            field: 'creatUser', // 对应的字段
+            width: '100px'
           },
           {
-            label: "发起部门", //表头显示
-            field: "creatDepartment", //对应的字段
+            label: '发起时间', // 表头显示
+            field: 'creatTime', // 对应的字段
+            width: '100px'
           },
           {
-            label: "发起人", //表头显示
-            field: "creatUser", //对应的字段
+            label: '收费日期', // 表头显示
+            field: 'creatTime', // 对应的字段
+            width: '100px'
           },
           {
-            label: "发起时间", //表头显示
-            field: "creatTime", //对应的字段
+            label: '工程性质', // 表头显示
+            field: 'projectType', // 对应的字段
+            width: '100px'
           },
+          {
+            label: '派工日期', // 表头显示
+            field: 'creatTime', // 对应的字段
+            width: '100px'
+          }
         ],
         actionList: [
-          //每列的一些操作
+          // 每列的一些操作
           {
-            label: "详情", //展示标签
+            label: '详情', // 展示标签
             method: (e) => {
-              this.lookInfo(e);
-            }, //触发的方法
+              this.lookInfo(e)
+            } // 触发的方法
           },
           {
-            label: "处理", //展示标签
+            label: '处理', // 展示标签
             method: (e) => {
-              this.handle(e);
-            }, //触发的方法
-          },
+              this.handle(e)
+            } // 触发的方法
+          }
         ],
         method: (e) => {
-          //获取数据的方法
-          return this.tableChage(e);
+          console.log('wonimaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
+          // 获取数据的方法
+          return this.tableChage(e)
         },
         dbClick: (e) => {
-          this.lookInfo(this.tableInfo.currentRow);
-        },
-      },
-    };
+          this.lookInfo(this.tableInfo.currentRow)
+        }
+      }
+    }
   },
-  mounted: function () {
-    this.getTableHeight();
+  mounted: function() {
+    this.getTableHeight()
     // window.resize(e=>{
     //   debugger
     //   this.getTableHeight();
     // })
   },
   created() {
-    this.config.subflowName = this.$options.name;
+    console.log('wonimaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
+    this.config.subflowName = this.$options.name
   },
   destroyed() {},
   methods: {
-    //查询按钮
+    // 查询按钮
     searchData() {
-      const searchInfo = Object.assign(this.searchCom, this.search);
-      this.$refs.tableCom.getTableDataByOne();
+      // const searchInfo = Object.assign(this.searchCom, this.search)
+      this.$refs.tableCom.getTableDataByOne()
     },
 
     /**
@@ -266,10 +273,10 @@ export default {
      * @param pageInfo 翻页的数据
      */
     tableChage(pageInfo) {
-      const searchData = commonMe.notJsonCopy(this.search);
-      searchData.size = pageInfo.size;
-      searchData.current = pageInfo.current;
-      return this.getData(searchData);
+      const searchData = commonMe.notJsonCopy(this.search)
+      searchData.size = pageInfo.size
+      searchData.current = pageInfo.current
+      return this.getData(searchData)
     },
 
     /**
@@ -278,59 +285,59 @@ export default {
      */
     getData(searchData) {
       return new Promise((resolve, reject) => {
-        xjTypeQuery(searchData)
+        fetchAssignPage(searchData)
           .then((res) => {
             resolve({
               records: res.data.records || [],
-              total: res.data.total || 0,
-            });
+              total: res.data.total || 0
+            })
           })
           .catch((res) => {
-            reject(res);
-          });
-      });
+            reject(res)
+          })
+      })
     },
 
     /**
      * 查看详情
      */
     lookInfo(data) {
-      this.title = "工程派工详情";
-      this.config.isEdit = false;
-      this.config.data = data;
-      this.flowShow = true;
+      this.title = '工程派工详情'
+      this.config.isEdit = false
+      this.config.data = data
+      this.flowShow = true
     },
 
     /**
      * 处理
      */
     handle(data) {
-      this.title = "工程派工处理";
-      this.config.isEdit = true;
-      this.config.data = data;
-      this.flowShow = true;
+      this.title = '工程派工处理'
+      this.config.isEdit = true
+      this.config.data = data
+      this.flowShow = true
     },
 
     /**
      * 登记按钮
      */
     addData() {
-      this.title = "工程派工登记";
-      this.config.isEdit = true;
-      this.config.data = null;
-      this.flowShow = true;
+      this.title = '工程派工登记'
+      this.config.isEdit = true
+      this.config.data = null
+      this.flowShow = true
     },
 
     /**
      * 计算table的高度
      */
     getTableHeight() {
-      this.rowHeight = this.$refs.searchDiv.$el.clientHeight;
-    },
-  },
-};
+      this.rowHeight = this.$refs.searchDiv.$el.clientHeight
+    }
+  }
+}
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageContentDiv {
   .searchDiv > * {
     margin-top: 10px;

+ 146 - 161
src/views/zhpt/projectManager/newInstall/proDispatch/addDispatch/inputPage.vue

@@ -2,33 +2,20 @@
   <div class="inputFormDiv">
     <div class="inputInfo">
       <inputLegend :label="'工程信息'" isopen="true">
-        <proNews></proNews>
+        <proNews />
       </inputLegend>
       <inputLegend :label="'工程派工'" isopen="true">
-        <inputForm
-          ref="inputForm"
-          :config="inputConfig"
-          v-model="ruleFormList.form1"
-        ></inputForm>
+        <inputForm ref="inputForm" v-model="ruleFormList.form1" :config="inputConfig" />
       </inputLegend>
       <inputLegend :label="'材料信息'" isopen="true">
         <div style="margin: 0 0 10px">
           <tftransfer ref="Tftransfer" />
         </div>
-        <inputForm
-          ref="inputForm"
-          :config="inputConfig4"
-          v-model="ruleFormList.form4"
-        ></inputForm>
+        <inputForm ref="inputForm" v-model="ruleFormList.form4" :config="inputConfig4" />
       </inputLegend>
 
       <inputLegend :label="'下一环节处理'" isopen="true">
-        <nodeHandle
-          ref="nextNodeInfo"
-          :inputData="inputData"
-          v-model="ruleFormList.form2"
-        >
-        </nodeHandle>
+        <nodeHandle ref="nextNodeInfo" v-model="ruleFormList.form2" :input-data="inputData" />
       </inputLegend>
       <!-- <inputLegend :label="'审核'" isopen="true">
         <auditPage ref='nextNodeInfo'  v-model="ruleFormList.form3"> </auditPage>
@@ -37,190 +24,188 @@
     <div class="optionButton">
       <el-button @click="cancel">取消</el-button>
       <el-button class="save" @click="saveData">保存</el-button>
-      <el-button class="submit" type="primary" @click="sureData"
-        >提交</el-button
-      >
+      <el-button class="submit" type="primary" @click="sureData">提交</el-button>
     </div>
   </div>
 </template>
 
 <script>
-import inputForm from "@/components/projectCom/inputForm/index.vue";
-import inputLegend from "@/components/projectCom/legend/index.vue";
-import nodeHandle from "@/components/projectCom/nodeHandle/index.vue";
-import auditPage from "@/components/projectCom/auditPage/index.vue";
-import proNews from "@/components/projectCom/proNews/index.vue";
-import tftransfer from "@/components/projectCom/TFtransfer/TFuserMat";
-import commonMe from "@/utils/common.js";
+import inputForm from '@/components/projectCom/inputForm/index.vue'
+import inputLegend from '@/components/projectCom/legend/index.vue'
+import nodeHandle from '@/components/projectCom/nodeHandle/index.vue'
+// import auditPage from '@/components/projectCom/auditPage/index.vue'
+import proNews from '@/components/projectCom/proNews/index.vue'
+import tftransfer from '@/components/projectCom/TFtransfer/TFuserMat'
+import commonMe from '@/utils/common.js'
 export default {
   components: {
     inputForm,
     inputLegend,
     nodeHandle,
-    auditPage,
+    // auditPage,
     proNews,
-    tftransfer,
+    tftransfer
   },
   props: {
-    inputData: {}, //当前数据的信息
+    // inputData: {} // 当前数据的信息
   },
   data() {
     return {
       ruleFormList: {
-        //使用的inputForm的列表
-        form1: null, //表单不单独取名,直接用form加数字组成
-        form2: null,
+        // 使用的inputForm的列表
+        form1: null, // 表单不单独取名,直接用form加数字组成
+        form2: null
         // form3:null,
       },
       tableBudget: [],
       tableTfuser: [],
-      nextNodeInfo: {}, //下一环节信息
-      inputForm: {}, //输入表单信息
+      nextNodeInfo: {}, // 下一环节信息
+      inputForm: {}, // 输入表单信息
       inputConfig: {
-        //输入的相关配置
+        // 输入的相关配置
         data: [
           {
             group: [
               {
-                field: "proNature", //存储字段
-                type: "select", //类型,不写入此参数则默认是text
-                label: "工程性质", //显示标签
-                required: true, //是否必填,
+                field: 'proNature', // 存储字段
+                type: 'select', // 类型,不写入此参数则默认是text
+                label: '工程性质', // 显示标签
+                required: true, // 是否必填,
                 config: {
-                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
-                  multiple: true, //是否多选
+                  // select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  multiple: true, // 是否多选
                   // searchData:'',//查询条件
                   // method:e=>{},//获取数据的方法
-                  data: [], //下拉数据
+                  data: [], // 下拉数据
                   field: {
-                    id: "id", //id代表的字段
-                    label: "label", //label的字段
-                  },
-                },
+                    id: 'id', // id代表的字段
+                    label: 'label' // label的字段
+                  }
+                }
               },
               {
-                field: "CompulWork", //存储字段
-                type: "select", //类型,不写入此参数则默认是text
-                label: "强制工序", //显示标签
-                required: true, //是否必填,
+                field: 'CompulWork', // 存储字段
+                type: 'select', // 类型,不写入此参数则默认是text
+                label: '强制工序', // 显示标签
+                required: true, // 是否必填,
                 config: {
-                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
-                  multiple: true, //是否多选
+                  // select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  multiple: true, // 是否多选
                   // searchData:'',//查询条件
                   // method:e=>{},//获取数据的方法
-                  data: [], //下拉数据
+                  data: [], // 下拉数据
                   field: {
-                    id: "id", //id代表的字段
-                    label: "label", //label的字段
-                  },
-                },
+                    id: 'id', // id代表的字段
+                    label: 'label' // label的字段
+                  }
+                }
               },
               {
-                field: "dispatchData", //存储字段
-                type: "date", //类型,不写入此参数则默认是text
-                label: "派工日期", //显示标签
-                required: true, //是否必填,
+                field: 'dispatchData', // 存储字段
+                type: 'date', // 类型,不写入此参数则默认是text
+                label: '派工日期', // 显示标签
+                required: true // 是否必填,
               },
               {
-                field: "sgCompany", //存储字段
-                type: "select", //类型,不写入此参数则默认是text
-                label: "施工单位", //显示标签
-                required: true, //是否必填,
+                field: 'sgCompany', // 存储字段
+                type: 'select', // 类型,不写入此参数则默认是text
+                label: '施工单位', // 显示标签
+                required: true, // 是否必填,
                 config: {
-                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
-                  multiple: true, //是否多选
+                  // select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  multiple: true, // 是否多选
                   // searchData:'',//查询条件
                   // method:e=>{},//获取数据的方法
-                  data: [], //下拉数据
+                  data: [], // 下拉数据
                   field: {
-                    id: "id", //id代表的字段
-                    label: "label", //label的字段
-                  },
-                },
+                    id: 'id', // id代表的字段
+                    label: 'label' // label的字段
+                  }
+                }
               },
               {
-                field: "jlCompany", //存储字段
-                type: "select", //类型,不写入此参数则默认是text
-                label: "监理单位", //显示标签
-                required: true, //是否必填,
+                field: 'jlCompany', // 存储字段
+                type: 'select', // 类型,不写入此参数则默认是text
+                label: '监理单位', // 显示标签
+                required: true, // 是否必填,
                 config: {
-                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
-                  multiple: true, //是否多选
+                  // select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  multiple: true, // 是否多选
                   // searchData:'',//查询条件
                   // method:e=>{},//获取数据的方法
-                  data: [], //下拉数据
+                  data: [], // 下拉数据
                   field: {
-                    id: "id", //id代表的字段
-                    label: "label", //label的字段
-                  },
-                },
+                    id: 'id', // id代表的字段
+                    label: 'label' // label的字段
+                  }
+                }
               },
               {
-                field: "designSituat", //存储字段
-                label: "工程任务主要内容", //显示标签
-                type: "area",
+                field: 'designSituat', // 存储字段
+                label: '工程任务主要内容', // 显示标签
+                type: 'area'
               },
               {
-                field: "isGet", //存储字段
-                type: "checkBox", //类型,不写入此参数则默认是text
-                required: true, //是否必填,
-                label: "是否需要领料", //显示标签
+                field: 'isGet', // 存储字段
+                type: 'checkBox', // 类型,不写入此参数则默认是text
+                required: true, // 是否必填,
+                label: '是否需要领料', // 显示标签
                 config: {
-                  //select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
+                  // select 下拉框的一些设置这里会使用projectCom的select组件,自动补足config里面的label
                   // multiple: true, //是否多选
                   // searchData:'',//查询条件
                   // method:e=>{},//获取数据的方法
                   data: [
                     {
-                      id: "1", //id代表的字段
-                      label: "是", //label的字段
+                      id: '1', // id代表的字段
+                      label: '是' // label的字段
                     },
                     {
-                      id: "2", //id代表的字段
-                      label: "否", //label的字段
-                    },
-                  ], //下拉数据
+                      id: '2', // id代表的字段
+                      label: '否' // label的字段
+                    }
+                  ], // 下拉数据
                   field: {
-                    id: "id", //id代表的字段
-                    label: "label", //label的字段
-                  },
-                },
-              },
-            ],
-          },
-        ],
+                    id: 'id', // id代表的字段
+                    label: 'label' // label的字段
+                  }
+                }
+              }
+            ]
+          }
+        ]
       },
       inputConfig4: {
-        //输入的相关配置
+        // 输入的相关配置
         data: [
           {
             group: [
               {
-                field: "note", //存储字段
-                label: "备注", //显示标签
-                type: "area",
+                field: 'note', // 存储字段
+                label: '备注', // 显示标签
+                type: 'area'
               },
               {
-                field: "registerDept", //存储字段
-                label: "操作部门", //显示标签
-                disabled: true,
+                field: 'registerDept', // 存储字段
+                label: '操作部门', // 显示标签
+                disabled: true
               },
               {
-                field: "registerStaffName", //存储字段
-                label: "操作人", //显示标签
-                disabled: true,
+                field: 'registerStaffName', // 存储字段
+                label: '操作人', // 显示标签
+                disabled: true
               },
               {
-                field: "registerTime", //存储字段
-                type: "date", //类型,不写入此参数则默认是text
-                label: "操作时间", //显示标签
-                disabled: true,
+                field: 'registerTime', // 存储字段
+                type: 'date', // 类型,不写入此参数则默认是text
+                label: '操作时间', // 显示标签
+                disabled: true
               },
               {
-                field: "file", //存储字段
-                type: "file", //类型,不写入此参数则默认是text
-                label: "附件", //显示标签
-                onlyFile: "", //只能上传的文件
+                field: 'file', // 存储字段
+                type: 'file', // 类型,不写入此参数则默认是text
+                label: '附件', // 显示标签
+                onlyFile: '', // 只能上传的文件
                 config: {
                   // fileList:[
                   // {
@@ -228,66 +213,66 @@ export default {
                   //   url:"https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100"
                   // }
                   // ]
-                },
-              },
-            ],
-          },
-        ],
-      },
-    };
+                }
+              }
+            ]
+          }
+        ]
+      }
+    }
   },
   methods: {
     /**
      * 取消
      */
     cancel() {
-      this.$emit("input", false);
+      this.$emit('input', false)
     },
     /**
      * 保存
      */
     saveData() {
-      const data = this.getFormData();
-      this.$emit("input", false);
+      // const data = this.getFormData()
+      this.$emit('input', false)
     },
 
     /**
      * 验证数据,提交的时候才进行验证,并将form组数据进行整合
      */
     validateData() {
-      //规则验证
-      let validateResult = true;
-      for (let item in this.ruleFormList) {
+      // 规则验证
+      let validateResult = true
+      for (const item in this.ruleFormList) {
         if (this.ruleFormList[item] && this.ruleFormList[item].validate) {
           this.ruleFormList[item].validate((e) => {
             if (!e) {
-              validateResult = e;
+              validateResult = e
             }
-          });
+          })
         }
       }
       if (!validateResult) {
-        this.$message.info("请将红色框中的数据补充完整");
+        this.$message.info('请将红色框中的数据补充完整')
       }
-      return validateResult;
+      return validateResult
     },
 
     /**
      * 处理数据
      */
     getFormData() {
-      this.tableTfuser = this.$refs.Tftransfer.submitData();
-      console.log("穿梭框数据", this.tableTfuser);
+      this.tableTfuser = this.$refs.Tftransfer.submitData()
+      console.log('穿梭框数据', this.tableTfuser)
       // console.log("表格数据", this.tableData22);
-      const formData = {};
-      //数据处理
-      for (let itemOne in this.ruleFormList) {
-        let tempData = this.ruleFormList[itemOne].ruleForm || [];
-        for (let item in tempData) {
-          formData[item] = commonMe.notJsonCopy(tempData[item]);
+      const formData = {}
+      // 数据处理
+      for (const itemOne in this.ruleFormList) {
+        const tempData = this.ruleFormList[itemOne].ruleForm || []
+        for (const item in tempData) {
+          formData[item] = commonMe.notJsonCopy(tempData[item])
         }
       }
-      return formData;
+      return formData
     },
 
     /**
@@ -295,29 +280,29 @@ export default {
      */
     sureData() {
       if (!this.validateData()) {
-        return;
+        return
       }
-      const data = this.getFormData();
-      console.log("提交参数", data);
-      this.$emit("input", false);
+      const data = this.getFormData()
+      console.log('提交参数', data)
+      this.$emit('input', false)
     },
 
     /**
      * 关闭页面
      */
     closePage() {
-      this.$emit("input", false);
-    },
-  },
-};
+      this.$emit('input', false)
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-@import "./src/styles/diaLogStyle/style.scss";
+@import './src/styles/diaLogStyle/style.scss';
 /deep/ .el-dialog {
   @include diaLogStyle;
 }
-@import "./src/styles/elTabsHeader/style.scss";
+@import './src/styles/elTabsHeader/style.scss';
 /deep/ .el-tabs__header.is-top {
   @include elTabsHeaderStyle;
 }
@@ -344,4 +329,4 @@ export default {
   width: 100%;
   border: 1px solid #dedede;
 }
-</style>
+</style>

+ 114 - 138
src/views/zhpt/projectManager/newInstall/proDispatch/materialPlan/index.vue

@@ -1,56 +1,36 @@
 <template>
-  <div
-    class="pageContentDiv"
-    style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px"
-  >
-    <el-row class="searchDiv" ref="searchDiv">
+  <div class="pageContentDiv" style="width: 100%; height: 88vh; padding: 8px 8px 0px 8px">
+    <el-row ref="searchDiv" class="searchDiv">
       <el-col :span="22">
-        <searchCom v-model="searchCom"></searchCom>
-        <selectList
-          :config="userTypeConfig"
-          v-model="search.userType"
-        ></selectList>
-        <el-button type="primary" size="small" @click="searchData"
-          >搜索</el-button
-        >
+        <searchCom v-model="searchCom" />
+        <selectList v-model="search.userType" :config="userTypeConfig" />
+        <el-button type="primary" size="small" @click="searchData">搜索</el-button>
       </el-col>
     </el-row>
-    <div
-      :style="
-        'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'
-      "
-    >
+    <div :style="'width: 100%;padding:8px;height:calc(100% - ' + rowHeight + 'px);'">
       <tableCom
         v-if="tableConfig.method || tableConfig.testData"
         ref="tableCom"
         v-model="tableInfo"
         :config="tableConfig"
-      ></tableCom>
+      />
     </div>
-    <inputPage
-      v-if="inputShow"
-      v-model="inputShow"
-      :inputData="inputData"
-    ></inputPage>
-    <detailPage
-      v-if="detailShow"
-      :lookData="lookData"
-      v-model="detailShow"
-    ></detailPage>
+    <inputPage v-if="inputShow" v-model="inputShow" :input-data="inputData" />
+    <detailPage v-if="detailShow" v-model="detailShow" :look-data="lookData" />
   </div>
 </template>
 
 <script>
-import tableCom from "@/components/projectCom/table/index.vue";
-import inputCom from "@/components/projectCom/input/index.vue";
-import searchCom from "@/components/projectCom/searchCom/index.vue";
-import timeSelect from "@/components/projectCom/timeSelect/index.vue";
-import selectList from "@/components/projectCom/select/index.vue";
-import commonMe from "@/utils/common.js";
-import detailPage from "./detailPage.vue";
-import inputPage from "./inputPage.vue";
+import tableCom from '@/components/projectCom/table/index.vue'
+import inputCom from '@/components/projectCom/input/index.vue'
+import searchCom from '@/components/projectCom/searchCom/index.vue'
+import timeSelect from '@/components/projectCom/timeSelect/index.vue'
+import selectList from '@/components/projectCom/select/index.vue'
+import commonMe from '@/utils/common.js'
+import detailPage from './detailPage.vue'
+import inputPage from './inputPage.vue'
 export default {
-  name: "wxCheck",
+  name: 'WxCheck',
   components: {},
   components: {
     tableCom,
@@ -59,29 +39,29 @@ export default {
     inputPage,
     searchCom,
     timeSelect,
-    selectList,
+    selectList
   },
   props: { data: Object },
   data() {
     return {
-      inputData: null, //更新的数据
-      lookData: {}, //详情数据
-      deleteAction: false, //删除按钮是否禁用
-      detailShow: false, //详情查看页面
-      rowHeight: 0, //查询栏的高度
+      inputData: null, // 更新的数据
+      lookData: {}, // 详情数据
+      deleteAction: false, // 删除按钮是否禁用
+      detailShow: false, // 详情查看页面
+      rowHeight: 0, // 查询栏的高度
       config: {},
       timeSelect: [],
       searchCom: {},
       search: {
-        //查询条件(除开翻页以外的其它查询条件)
-        userType: null, //用户类型
-        projectLink: "", //工程环节
-        state: "", //工程状态
+        // 查询条件(除开翻页以外的其它查询条件)
+        userType: null, // 用户类型
+        projectLink: '', // 工程环节
+        state: '' // 工程状态
       },
       userTypeConfig: {
-        //用户类型下拉框配置
+        // 用户类型下拉框配置
         // multiple:true,//是否多选
-        label: "用户类型",
+        label: '用户类型',
         // searchData:{//查询条件
         //   current:1,
         //   size:1000
@@ -89,98 +69,98 @@ export default {
         // method:e=>{},//获取数据的方法
         data: [
           {
-            id: "1",
-            label: "用户1",
+            id: '1',
+            label: '用户1'
           },
           {
-            id: "2",
-            label: "用户2",
-          },
-        ], //下拉数据
+            id: '2',
+            label: '用户2'
+          }
+        ], // 下拉数据
         field: {
-          id: "id", //id代表的字段
-          label: "label", //label的字段
-        },
+          id: 'id', // id代表的字段
+          label: 'label' // label的字段
+        }
       },
-      inputShow: false, //输入页面显示控制
-      tableInfo: {}, //table相关的一些信息,如当前选择的行数,当前双击的信息等
+      inputShow: false, // 输入页面显示控制
+      tableInfo: {}, // table相关的一些信息,如当前选择的行数,当前双击的信息等
       tableConfig: {
-        check: true, //是否展示选中框
-        testData: true, //是否使用测试数据
-        index: true, //是否展示序号
+        check: true, // 是否展示选中框
+        testData: true, // 是否使用测试数据
+        index: true, // 是否展示序号
         fieldList: [
-          //对应的字段列表
+          // 对应的字段列表
           {
-            label: "工程编号", //表头显示
-            field: "proNum", //对应的字段
+            label: '工程编号', // 表头显示
+            field: 'proNum' // 对应的字段
           },
           {
-            label: "工程名称", //表头显示
-            field: "proName", //对应的字段
+            label: '工程名称', // 表头显示
+            field: 'proName' // 对应的字段
           },
           {
-            label: "工程地址", //表头显示
-            field: "address", //对应的字段
+            label: '工程地址', // 表头显示
+            field: 'address' // 对应的字段
           },
           {
-            label: "用户类型", //表头显示
-            field: "userType", //对应的字段
+            label: '用户类型', // 表头显示
+            field: 'userType' // 对应的字段
           },
           {
-            label: "工程性质", //表头显示
-            field: "proNature", //对应的字段
+            label: '工程性质', // 表头显示
+            field: 'proNature' // 对应的字段
           },
           {
-            label: "施工单位", //表头显示
-            field: "sgCompany", //对应的字段
+            label: '施工单位', // 表头显示
+            field: 'sgCompany' // 对应的字段
           },
           {
-            label: "监理单位", //表头显示
-            field: "jlCompany", //对应的字段
+            label: '监理单位', // 表头显示
+            field: 'jlCompany' // 对应的字段
           },
           {
-            label: "所属公司", //表头显示
-            field: "company", //对应的字段
-          },
+            label: '所属公司', // 表头显示
+            field: 'company' // 对应的字段
+          }
         ],
         actionList: [
-          //每列的一些操作
+          // 每列的一些操作
           {
-            label: "材料信息", //展示标签
+            label: '材料信息', // 展示标签
             method: (e) => {
-              this.lookInfo(e);
-            }, //触发的方法
-          },
+              this.lookInfo(e)
+            } // 触发的方法
+          }
         ],
         method: (e) => {
-          //获取数据的方法
-          return this.tableChage(e);
+          // 获取数据的方法
+          return this.tableChage(e)
         },
         dbClick: (e) => {
-          this.lookInfo(this.tableInfo.currentRow);
-        },
-      },
-    };
-  },
-  mounted: function () {
-    this.getTableHeight();
+          this.lookInfo(this.tableInfo.currentRow)
+        }
+      }
+    }
   },
-  created() {},
   watch: {
     tableInfo() {
       if (this.tableInfo.checkRow && this.tableInfo.checkRow.length > 0) {
-        this.deleteAction = false;
+        this.deleteAction = false
       } else {
-        this.deleteAction = true;
+        this.deleteAction = true
       }
-    },
+    }
+  },
+  mounted: function() {
+    this.getTableHeight()
   },
+  created() {},
   destroyed() {},
   methods: {
-    //查询按钮
+    // 查询按钮
     searchData() {
-      const searchInfo = Object.assign(this.searchCom, this.search);
-      this.$refs.tableCom.getTableDataByOne();
+      const searchInfo = Object.assign(this.searchCom, this.search)
+      this.$refs.tableCom.getTableDataByOne()
     },
 
     /**
@@ -188,10 +168,10 @@ export default {
      * @param pageInfo 翻页的数据
      */
     tableChage(pageInfo) {
-      const searchData = commonMe.notJsonCopy(this.search);
-      searchData.size = pageInfo.size;
-      searchData.current = pageInfo.current;
-      return this.getData(searchData);
+      const searchData = commonMe.notJsonCopy(this.search)
+      searchData.size = pageInfo.size
+      searchData.current = pageInfo.current
+      return this.getData(searchData)
     },
 
     /**
@@ -204,51 +184,47 @@ export default {
           .then((res) => {
             resolve({
               records: res.data.records || [],
-              total: res.data.total || 0,
-            });
+              total: res.data.total || 0
+            })
           })
           .catch((res) => {
-            reject(res);
-          });
-      });
+            reject(res)
+          })
+      })
     },
 
     /**
      * 查看详情
      */
     lookInfo(data) {
-      this.lookData = {};
-      this.detailShow = true;
+      this.lookData = {}
+      this.detailShow = true
     },
 
     /**
      * 删除
      * */
     deleteData(data) {
-      let deleteList = [];
+      let deleteList = []
       if (data) {
-        deleteList = [data];
+        deleteList = [data]
       } else {
-        deleteList = this.tableInfo.checkRow;
+        deleteList = this.tableInfo.checkRow
       }
-      this.$confirm(
-        "此操作将永久删除" + deleteList.length + "条材料信息" + ", 是否继续?",
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
+      this.$confirm('此操作将永久删除' + deleteList.length + '条材料信息' + ', 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
         .then(() => {
-          this.sendDelte(deleteList);
+          this.sendDelte(deleteList)
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
+            type: 'info',
+            message: '已取消删除'
+          })
+        })
     },
 
     /**
@@ -260,20 +236,20 @@ export default {
      * 添加
      */
     addData() {
-      this.inputData = null;
-      this.inputShow = true;
+      this.inputData = null
+      this.inputShow = true
     },
 
     /**
      * 计算table的高度
      */
     getTableHeight() {
-      this.rowHeight = this.$refs.searchDiv.$el.clientHeight;
-    },
-  },
-};
+      this.rowHeight = this.$refs.searchDiv.$el.clientHeight
+    }
+  }
+}
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .pageContentDiv {
   .searchDiv > * {
     margin-top: 10px;