Ver código fonte

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dengfei

695593266@qq.com 8 meses atrás
pai
commit
fc7d9630e7

+ 10 - 0
src/api/technology/route/index.js

@@ -99,6 +99,16 @@ export default {
       return res.data.data;
     }
   },
+
+  //工艺路线列表-变更
+  taskinstanceChange: async (data) => {
+    const res = await request.post(
+      '/main/producerouting/taskinstance/change/' , data
+    );
+    if (res.data.code == 0) {
+      return res.data.message;
+    }
+  },
   //删除
   delete: async (data) => {
     const res = await request.delete('/main/producerouting/delete/' + data);

+ 2 - 1
src/components/common/seekPage.vue

@@ -196,7 +196,8 @@
       seekList: {
         type: Array,
         default: () => []
-      }
+      },
+      keyValue:''
     },
 
     components: {},

+ 21 - 1
src/views/enterpriseModel/dept/components/org-edit.vue

@@ -132,6 +132,24 @@
             />
           </el-form-item>
         </el-col>
+        <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+          <el-form-item label="工商注册号:" prop="businessRegistrationNo">
+            <el-input
+              clearable
+              v-model="enterprise.businessRegistrationNo"
+              placeholder="请输入工商注册号"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+          <el-form-item label="联系人:" prop="contact">
+            <el-input
+              clearable
+              v-model="enterprise.contact"
+              placeholder="请输入联系人"
+            />
+          </el-form-item>
+        </el-col>
         <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
           <el-form-item label="登记日期:" prop="registerDate">
             <el-date-picker
@@ -388,7 +406,9 @@
         status: 1,
         manager: [],
         groupCode: '',
-        managerFirst: []
+        managerFirst: [],
+        businessRegistrationNo:'',
+        contact:''
       };
       return {
         defaultForm,

+ 3 - 3
src/views/material/product/components/index-data.vue

@@ -3,7 +3,7 @@
     <!-- 数据表格 -->
     <ele-pro-table
       ref="table"
-      :columns="newColumns"
+      :columns="columns"
       :datasource="datasource"
       :need-page="true"
       :selection.sync="selection"
@@ -680,7 +680,7 @@
           }
         ],
 
-        newColumns: [],
+        // newColumns: [],
         // 表格选中数据
         selection: [],
         // 是否显示编辑弹窗
@@ -861,7 +861,7 @@
             };
           });
 
-          this.newColumns = [...this.columns, ...newRes, ...privateColumn];
+          this.columns = [...this.columns, ...newRes, ...privateColumn];
           this.getTabColumns();
           this.$forceUpdate();
         });

+ 10 - 1
src/views/regulationManagement/components/addOrEditDialog.vue

@@ -282,7 +282,15 @@
         if (type !== 'add') {
           row.assessmentIndicators = Number(row.assessmentIndicators);
           this.form = JSON.parse(JSON.stringify(row));
-          this.tableList = this.form.assessmentCriteria;
+          // 转换value为number类型
+          this.tableList = this.form.assessmentCriteria?.map((i) => {
+            return i.map((j) => {
+              return {
+                ...j,
+                value: Number(j.value)
+              };
+            });
+          });
           this.buissChange(row.type, 'init');
           this.salesChange(row.assessmentIndicators, 'init');
         } else {
@@ -322,6 +330,7 @@
       salesChange(val, type) {
         let data = this.options.find((el) => el.value == val);
         this.valueOptions = data.nodes;
+        console.log('this.valueOptions', this.valueOptions);
         this.statusOptions = data.equles;
         if (type == 'init') {
           return;

+ 11 - 1
src/views/rulesManagement/releaseRules/components/permitAdd.vue

@@ -201,7 +201,7 @@
                 v-if="row.paramType != 7"
                 clearable
                 dictName="数学字符"
-                v-model="row.numberOperator"
+                v-model="row.symbol"
                 placeholder="请选择逻辑"
                 size="mini"
               ></DictSelection>
@@ -493,6 +493,7 @@
           // startDate 启用日期要大于当前时间
           // stopDate 停用时间要大于当前时间并且大于启用日期
           startDate: [
+            { required: true, message: '请选择启用日期', trigger: 'blur' },
             { required: true, message: '请选择启用日期', trigger: 'change' },
             { validator: this.validateStartDate, trigger: 'change' }
           ],
@@ -527,6 +528,7 @@
 
           this.formData.startDate = new Date(row.startDate);
           this.formData.stopDate = new Date(row.stopDate);
+          this.formData.classify = this.formData.classify + '';
 
           this.recordrulesDetailPage(row);
           this.recordrulesCyclePage(row);
@@ -544,6 +546,7 @@
           this.formData.id = null;
           this.formData.startDate = new Date(row.startDate);
           this.formData.stopDate = new Date(row.stopDate);
+          this.formData.classify = this.formData.classify + '';
 
           this.recordrulesDetailPage(row);
           this.recordrulesCyclePage(row);
@@ -717,6 +720,13 @@
           return callback(new Error('启用日期不能为空'));
         }
 
+        // 启用日期大于等于今天
+        const today = new Date();
+        today.setHours(0, 0, 0, 0); // 设置为当天的开始时间
+        if (new Date(startDate) < today) {
+          return callback(new Error('启用日期必须大于等于当前日期'));
+        }
+
         callback();
       },
       // stopDate 停用时间要大于当前时间并且大于启用日期

+ 240 - 202
src/views/system/organization/components/org-edit.vue

@@ -129,6 +129,24 @@
             />
           </el-form-item>
         </el-col>
+        <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+          <el-form-item label="工商注册号:" prop="businessRegistrationNo">
+            <el-input
+              clearable
+              v-model="enterprise.businessRegistrationNo"
+              placeholder="请输入工商注册号"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+          <el-form-item label="联系人:" prop="contact">
+            <el-input
+              clearable
+              v-model="enterprise.contact"
+              placeholder="请输入联系人"
+            />
+          </el-form-item>
+        </el-col>
         <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
           <el-form-item label="登记日期:" prop="registerDate">
             <el-date-picker
@@ -213,223 +231,243 @@
 </template>
 
 <script>
-import OrgSelect from './org-select.vue';
-import OrgTypeSelect from './org-type-select.vue';
-import staffSelection from './staffSelection.vue';
-import fileUpload from '@/components/upload/fileUpload';
-import { copyObj } from '@/utils/util';
-import addUser from '@/views/system/user/components/add.vue';
-const defEnterprise = {
-  businessLicenseFile: [],
-  name: null,
-  address: null,
-  tel: '',
-  registerDate: '',
-  unifiedSocialCreditCode: '',
-  businessScope: '',
-  mainProduct: '',
-  remark: '',
-  fax: ''
-};
-import {
-  addOrganization,
-  updateOrganization,
-  getById,
-  getCode
-} from '@/api/system/organization';
-export default {
-  components: { OrgSelect, OrgTypeSelect, staffSelection, fileUpload, addUser },
-  props: {
-    // 弹窗是否打开
-    visible: Boolean,
-    // 修改回显的数据
-    data: Object,
-    // 上级id
-    parentId: [Number, String],
-    // 机构数据
-    organizationList: Array
-  },
-  data() {
-    const defaultForm = {
-      id: null,
-      parentId: null,
-      name: '',
-      type: '',
-      sort: null,
-      manager: [],
-      groupCode: '',
-      managerFirst: []
-
-    };
-    return {
-      defaultForm,
-      responsibleName: '',
-      managerFirst:{},
-      // 表单数据
-      form: { ...defaultForm },
-      enterprise: { ...defEnterprise },
-      // 表单验证规则
-      rules: {
-        name: [{ required: true, message: '请输入机构名称', trigger: 'blur' }],
-        manager: [{ required: true, message: '请选择负责人', trigger: 'blur' }],
-        type: [{ required: true, message: '请选择机构类型', trigger: 'blur' }]
-      },
-      // 表单验证规则
-      enterpriseRules: {
-        name: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
-        address: [
-          { required: true, message: '请输入企业地址', trigger: 'blur' }
-        ],
-        unifiedSocialCreditCode: [
-          { required: true, message: '请输入统一社会性代码', trigger: 'blur' }
-        ]
-      },
-      // 提交状态
-      loading: false,
-      // 是否是修改
-      isUpdate: false
-    };
-  },
-  computed: {
-    // 是否开启响应式布局
-    styleResponsive() {
-      return this.$store.state.theme.styleResponsive;
-    }
-  },
-  methods: {
-    /* 保存编辑 */
-    async save() {
-      if (!(await this.formValidate())) {
-        return false;
-      }
-      if (
-        ['10', '20'].includes(this.form.type) &&
-        !(await this.enterpriseValidate())
-      ) {
-        return false;
-      }
-      let form = {
-        ...this.form
+  import OrgSelect from './org-select.vue';
+  import OrgTypeSelect from './org-type-select.vue';
+  import staffSelection from './staffSelection.vue';
+  import fileUpload from '@/components/upload/fileUpload';
+  import { copyObj } from '@/utils/util';
+  import addUser from '@/views/system/user/components/add.vue';
+  const defEnterprise = {
+    businessLicenseFile: [],
+    name: null,
+    address: null,
+    tel: '',
+    registerDate: '',
+    unifiedSocialCreditCode: '',
+    businessScope: '',
+    mainProduct: '',
+    remark: '',
+    fax: '',
+    businessRegistrationNo:'',
+    contact:''
+  };
+  import {
+    addOrganization,
+    updateOrganization,
+    getById,
+    getCode
+  } from '@/api/system/organization';
+  export default {
+    components: {
+      OrgSelect,
+      OrgTypeSelect,
+      staffSelection,
+      fileUpload,
+      addUser
+    },
+    props: {
+      // 弹窗是否打开
+      visible: Boolean,
+      // 修改回显的数据
+      data: Object,
+      // 上级id
+      parentId: [Number, String],
+      // 机构数据
+      organizationList: Array
+    },
+    data() {
+      const defaultForm = {
+        id: null,
+        parentId: null,
+        name: '',
+        type: '',
+        sort: null,
+        manager: [],
+        groupCode: '',
+        managerFirst: []
       };
-      if (['10', '20'].includes(this.form.type)) {
-        form['enterprise'] = this.enterprise;
-      }
-      if(this.managerFirst?.name){
-        this.form.managerFirst[0]=this.managerFirst
-      }
-      this.loading = true;
-      const data = {
-        ...form,
-        parentId: this.form.parentId || 0
+      return {
+        defaultForm,
+        responsibleName: '',
+        managerFirst: {},
+        // 表单数据
+        form: { ...defaultForm },
+        enterprise: { ...defEnterprise },
+        // 表单验证规则
+        rules: {
+          name: [
+            { required: true, message: '请输入机构名称', trigger: 'blur' }
+          ],
+          manager: [
+            { required: true, message: '请选择负责人', trigger: 'blur' }
+          ],
+          type: [{ required: true, message: '请选择机构类型', trigger: 'blur' }]
+        },
+        // 表单验证规则
+        enterpriseRules: {
+          name: [
+            { required: true, message: '请输入企业名称', trigger: 'blur' }
+          ],
+          address: [
+            { required: true, message: '请输入企业地址', trigger: 'blur' }
+          ],
+          unifiedSocialCreditCode: [
+            { required: true, message: '请输入统一社会性代码', trigger: 'blur' }
+          ]
+        },
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false
       };
-      if (!this.isUpdate) {
-        delete data.id;
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
       }
-      const saveOrUpdate = this.isUpdate ? updateOrganization : addOrganization;
-      saveOrUpdate(data)
-        .then((msg) => {
-          this.loading = false;
-          this.$message.success(msg);
-          this.updateVisible(false);
-          this.$emit('done');
-        })
-        .catch((e) => {
-          this.loading = false;
-          // this.$message.error(e.message);
-        });
     },
-    formValidate() {
-      return new Promise((resolve, reject) => {
-        this.$refs.form.validate((valid) => {
-          resolve(valid);
+    methods: {
+      /* 保存编辑 */
+      async save() {
+        if (!(await this.formValidate())) {
+          return false;
+        }
+        if (
+          ['10', '20'].includes(this.form.type) &&
+          !(await this.enterpriseValidate())
+        ) {
+          return false;
+        }
+        let form = {
+          ...this.form
+        };
+        if (['10', '20'].includes(this.form.type)) {
+          form['enterprise'] = this.enterprise;
+        }
+        if (this.managerFirst?.name) {
+          this.form.managerFirst[0] = this.managerFirst;
+        }
+        this.loading = true;
+        const data = {
+          ...form,
+          parentId: this.form.parentId || 0
+        };
+        if (!this.isUpdate) {
+          delete data.id;
+        }
+        const saveOrUpdate = this.isUpdate
+          ? updateOrganization
+          : addOrganization;
+        saveOrUpdate(data)
+          .then((msg) => {
+            this.loading = false;
+            this.$message.success(msg);
+            this.updateVisible(false);
+            this.$emit('done');
+          })
+          .catch((e) => {
+            this.loading = false;
+            // this.$message.error(e.message);
+          });
+      },
+      formValidate() {
+        return new Promise((resolve, reject) => {
+          this.$refs.form.validate((valid) => {
+            resolve(valid);
+          });
         });
-      });
-    },
-    enterpriseValidate() {
-      return new Promise((resolve, reject) => {
-        this.$refs.enterpriseForm.validate((valid) => {
-          resolve(valid);
+      },
+      enterpriseValidate() {
+        return new Promise((resolve, reject) => {
+          this.$refs.enterpriseForm.validate((valid) => {
+            resolve(valid);
+          });
         });
-      });
-    },
+      },
 
-    //选择负责人
-    confirmStaffSelection(data) {
-      this.form.manager = JSON.parse(JSON.stringify(data));
-      this.responsibleName = data.map((item) => item.name).toString();
-    },
-    openStaffSelection() {
-      console.log(this.form.manager);
-      this.$refs.staffSelection.open(
-        JSON.parse(JSON.stringify(this.form.manager)) || []
-      );
-    },
-    addOpen() {
-      this.$refs.addUserRef.open();
-    },
-    clearManagerFirst() {
-      this.managerFirst = {};
-    },
-    userBk(data) {
-      this.managerFirst = data;
-    },
-    /* 更新visible */
-    updateVisible(value) {
-      this.$emit('update:visible', value);
-    }
-  },
-  watch: {
-    form: {
-      deep: true,
-      handler(n) {
-        this.enterprise.name = n.name;
+      //选择负责人
+      confirmStaffSelection(data) {
+        this.form.manager = JSON.parse(JSON.stringify(data));
+        this.responsibleName = data.map((item) => item.name).toString();
+      },
+      openStaffSelection() {
+        console.log(this.form.manager);
+        this.$refs.staffSelection.open(
+          JSON.parse(JSON.stringify(this.form.manager)) || []
+        );
+      },
+      addOpen() {
+        this.$refs.addUserRef.open();
+      },
+      clearManagerFirst() {
+        this.managerFirst = {};
+      },
+      userBk(data) {
+        this.managerFirst = data;
+      },
+      /* 更新visible */
+      updateVisible(value) {
+        this.$emit('update:visible', value);
       }
     },
-    visible(visible) {
-      if (visible) {
-        if (this.data) {
-          getById(this.data.id).then((res) => {
-            for (const key in res.enterprise) {
-              this.$set(this.enterprise, key, res.enterprise[key]);
-            }
-            for (const key in res) {
-              if (key == 'parentId') {
-                this.$set(this.form, key, res[key] == 0 ? '' : res[key] ?? '');
+    watch: {
+      form: {
+        deep: true,
+        handler(n) {
+          this.enterprise.name = n.name;
+        }
+      },
+      visible(visible) {
+        if (visible) {
+          if (this.data) {
+            getById(this.data.id).then((res) => {
+              for (const key in res.enterprise) {
+                this.$set(this.enterprise, key, res.enterprise[key]);
               }
-              if (key != 'enterprise') {
-                this.$set(this.form, key, res[key]);
+              for (const key in res) {
+                if (key == 'parentId') {
+                  this.$set(
+                    this.form,
+                    key,
+                    res[key] == 0 ? '' : res[key] ?? ''
+                  );
+                }
+                if (key != 'enterprise') {
+                  this.$set(this.form, key, res[key]);
+                }
               }
-            }
 
-            this.form.type = '' + this.form.type; //回显
-            if(this.form?.managerFirst.length){
-              this.managerFirst=this.form.managerFirst[0]
-            }
-            this.responsibleName =
-              res.manager && res.manager.map((item) => item.name).toString();
-          });
+              this.form.type = '' + this.form.type; //回显
+              if (this.form?.managerFirst.length) {
+                this.managerFirst = this.form.managerFirst[0];
+              }
+              this.responsibleName =
+                res.manager && res.manager.map((item) => item.name).toString();
+            });
 
-          // this.form.type = '' + this.form.type; //回显
-          // this.responsibleName =
-          //   this.data.manager &&
-          //   this.data.manager.map((item) => item.name).toString();
-          this.isUpdate = true;
+            // this.form.type = '' + this.form.type; //回显
+            // this.responsibleName =
+            //   this.data.manager &&
+            //   this.data.manager.map((item) => item.name).toString();
+            this.isUpdate = true;
+          } else {
+            this.form.parentId = this.parentId;
+            getCode().then((res) => {
+              this.form.groupCode = res;
+            });
+            this.isUpdate = false;
+          }
         } else {
-          this.form.parentId = this.parentId;
-          getCode().then((res) => {
-            this.form.groupCode = res;
-          });
-          this.isUpdate = false;
+          this.$refs.form.clearValidate();
+          this.$refs.enterpriseForm &&
+            this.$refs.enterpriseForm.clearValidate();
+          this.form = { ...this.defaultForm };
+          this.enterprise = { ...defEnterprise };
+          this.managerFirst = {};
+          this.responsibleName = '';
         }
-      } else {
-        this.$refs.form.clearValidate();
-        this.$refs.enterpriseForm && this.$refs.enterpriseForm.clearValidate();
-        this.form = { ...this.defaultForm };
-        this.enterprise = { ...defEnterprise };
-        this.managerFirst={}
-        this.responsibleName = '';
       }
     }
-  }
-};
+  };
 </script>

+ 14 - 3
src/views/system/organization/components/org-user-edit.vue

@@ -239,6 +239,14 @@
               placeholder="请输入微信号"
             />
           </el-form-item>
+          <el-form-item label="户籍地址:" prop="censusAddress">
+            <el-input
+              clearable
+              :maxlength="100"
+              v-model="form.censusAddress"
+              placeholder="户籍地址"
+            />
+          </el-form-item>
         </el-col>
       </el-row>
       <el-tabs v-model="activeName">
@@ -1103,7 +1111,7 @@
     <aptitudeDialog
       ref="aptitudeDialogRef"
       @success="chooseAptitude"
-      :disabledIds="form.professions?.map(item => item.id)"
+      :disabledIds="form.professions?.map((item) => item.id)"
     ></aptitudeDialog>
   </ele-modal>
 </template>
@@ -1176,7 +1184,8 @@
         birthday: '',
         signature: {},
         postName: '',
-        professions: []
+        professions: [],
+        censusAddress:''
       };
       return {
         defaultForm,
@@ -1990,7 +1999,9 @@
             formData.postId = formData.postId.toString();
           }
           if (formData.professions?.length) {
-            formData.professionId = formData.professions.map(item=>item.id).toString();
+            formData.professionId = formData.professions
+              .map((item) => item.id)
+              .toString();
           }
           const data = {
             ...formData

+ 293 - 266
src/views/technology/route/index.vue

@@ -98,7 +98,15 @@
           >
             发布
           </el-link>
-
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-finished"
+            @click="alteration(row)"
+            v-if="row.approvalStatus == 2"
+          >
+            变更
+          </el-link>
           <el-link
             type="primary"
             :underline="false"
@@ -167,288 +175,307 @@
 </template>
 
 <script>
-  import tabMixins from '@/mixins/tableColumnsMixin';
-  import UserSearch from './components/user-search.vue';
-  import UserEdit from './components/user-edit.vue';
-  import UserDetail from './components/user-detail.vue';
-  import historyModal from './components/historyModal.vue';
-  import route from '@/api/technology/route';
-  import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
-  import { reviewStatus } from '@/enum/dict';
-  import importDialog from '@/components/upload/import-dialogNew.vue';
-  export default {
-    name: 'technologyRoute',
-    mixins: [tabMixins],
-    components: {
-      UserSearch,
-      UserEdit,
-      UserDetail,
-      historyModal,
-      processSubmitDialog,
-      importDialog
-    },
-    data() {
-      return {
-        isUpdate: false,
-        // 表格列配置
-        columns: [
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          // {
-          //   slot: 'routeType',
-          //   label: '类型',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
-          {
-            prop: 'sort',
-            label: '排序',
-            showOverflowTooltip: true,
-            align: 'center',
-            width: 110,
-          },
-          {
-            prop: 'code',
-            label: '工艺路线编码',
-            showOverflowTooltip: true,
-            align: 'center',
-            minWidth: 110,
-            slot: 'code'
-          },
-          {
-            prop: 'name',
-            label: '工艺路线名称',
-            showOverflowTooltip: true,
-            align: 'center',
-            minWidth: 110
-          },
-
-          {
-            prop: 'version',
-            label: '工艺路线版本',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
+import tabMixins from '@/mixins/tableColumnsMixin';
+import UserSearch from './components/user-search.vue';
+import UserEdit from './components/user-edit.vue';
+import UserDetail from './components/user-detail.vue';
+import historyModal from './components/historyModal.vue';
+import route from '@/api/technology/route';
+import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
+import { reviewStatus } from '@/enum/dict';
+import importDialog from '@/components/upload/import-dialogNew.vue';
+export default {
+  name: 'technologyRoute',
+  mixins: [tabMixins],
+  components: {
+    UserSearch,
+    UserEdit,
+    UserDetail,
+    historyModal,
+    processSubmitDialog,
+    importDialog
+  },
+  data() {
+    return {
+      isUpdate: false,
+      // 表格列配置
+      columns: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        // {
+        //   slot: 'routeType',
+        //   label: '类型',
+        //   align: 'center',
+        //   showOverflowTooltip: true
+        // },
+        {
+          prop: 'sort',
+          label: '排序',
+          showOverflowTooltip: true,
+          align: 'center',
+          width: 110
+        },
+        {
+          prop: 'code',
+          label: '工艺路线编码',
+          showOverflowTooltip: true,
+          align: 'center',
+          minWidth: 110,
+          slot: 'code'
+        },
+        {
+          prop: 'name',
+          label: '工艺路线名称',
+          showOverflowTooltip: true,
+          align: 'center',
+          minWidth: 110
+        },
 
-          // {
-          //   prop: 'produceVersionName',
-          //   label: '工艺类型',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
+        {
+          prop: 'version',
+          label: '工艺路线版本',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
 
-          {
-            //修改此prop名称时,请同步修改columnKey属性和下方selectType方法
-            prop: 'status',
-            label: '状态',
-            align: 'center',
-            slot: 'status',
-            showOverflowTooltip: true,
-            minWidth: 110,
-            filters: [
-              { text: '草稿', value: -1 },
-              { text: '失效', value: 0 },
-              { text: '生效', value: 1 }
-            ],
-            filterMultiple: false,
-            columnKey: 'status'
-          },
-          {
-            prop: 'approvalStatus',
-            label: '审核状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100,
-            formatter: (_row, _column, cellValue) => {
-              return reviewStatus[_row.approvalStatus];
-            }
-          },
-          {
-            prop: 'factoriesName',
-            label: '所属工厂',
-            align: 'center',
-            showOverflowTooltip: true
-          },
+        // {
+        //   prop: 'produceVersionName',
+        //   label: '工艺类型',
+        //   align: 'center',
+        //   showOverflowTooltip: true
+        // },
 
-          {
-            align: 'center',
-            prop: 'createTime',
-            label: '创建时间',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 280,
-            align: 'left',
-            resizable: false,
-            slot: 'action'
+        {
+          //修改此prop名称时,请同步修改columnKey属性和下方selectType方法
+          prop: 'status',
+          label: '状态',
+          align: 'center',
+          slot: 'status',
+          showOverflowTooltip: true,
+          minWidth: 110,
+          filters: [
+            { text: '草稿', value: -1 },
+            { text: '失效', value: 0 },
+            { text: '生效', value: 1 }
+          ],
+          filterMultiple: false,
+          columnKey: 'status'
+        },
+        {
+          prop: 'approvalStatus',
+          label: '审核状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100,
+          formatter: (_row, _column, cellValue) => {
+            return reviewStatus[_row.approvalStatus];
           }
-        ],
+        },
+        {
+          prop: 'factoriesName',
+          label: '所属工厂',
+          align: 'center',
+          showOverflowTooltip: true
+        },
 
-        // 表格选中数据
-        selection: [],
-        // 当前编辑数据
-        current: null,
-        processSubmitDialogFlag: false,
-        // 是否显示编辑弹窗
-        showEdit: false,
-        detailEdit: false,
+        {
+          align: 'center',
+          prop: 'createTime',
+          label: '创建时间',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          columnKey: 'action',
+          label: '操作',
+          width: 280,
+          align: 'left',
+          resizable: false,
+          slot: 'action'
+        }
+      ],
 
-        statusList: [
-          { label: '草稿', value: -1 },
-          { label: '失效', value: 0 },
-          { label: '生效', value: 1 }
-        ],
-        loading: false,
-        cacheKeyUrl: 'fb92f8df-technology-route'
-      };
-    },
-    computed: {
-      // 是否开启响应式布局
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
+      // 表格选中数据
+      selection: [],
+      // 当前编辑数据
+      current: null,
+      processSubmitDialogFlag: false,
+      // 是否显示编辑弹窗
+      showEdit: false,
+      detailEdit: false,
+
+      statusList: [
+        { label: '草稿', value: -1 },
+        { label: '失效', value: 0 },
+        { label: '生效', value: 1 }
+      ],
+      loading: false,
+      cacheKeyUrl: 'fb92f8df-technology-route'
+    };
+  },
+  computed: {
+    // 是否开启响应式布局
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
+  methods: {
+    selectType(value) {
+      let where = {};
+      if (value.status.length > 0) {
+        where['status'] = value.status[0];
       }
+      this.reload(where);
+    },
+    /* 表格数据源 */
+    async datasource({ page, limit, where, order }) {
+      const res = await route.list({
+        ...where,
+        ...order,
+        pageNum: page,
+        size: limit
+      });
+      return res;
+    },
+    importDialog() {
+      this.$refs.importDialogRef.open();
+    },
+    checkStatus(row) {
+      let obj = this.statusList.find((it) => it.value == row.status);
+      return obj.label;
     },
-    methods: {
-      selectType(value) {
-        let where = {};
-        if (value.status.length > 0) {
-          where['status'] = value.status[0];
-        }
-        this.reload(where);
-      },
-      /* 表格数据源 */
-      async datasource({ page, limit, where, order }) {
-        const res = await route.list({
-          ...where,
-          ...order,
-          pageNum: page,
-          size: limit
-        });
-        return res;
-      },
-      importDialog() {
-        this.$refs.importDialogRef.open();
-      },
-      checkStatus(row) {
-        let obj = this.statusList.find((it) => it.value == row.status);
-        return obj.label;
-      },
 
-      /* 刷新表格 */
-      reload(where) {
-        this.$refs.table.reload({ page: 1, where: where });
-      },
-      /* 打开编辑弹窗 */
-      openEdit(row) {
-        this.current = row;
-        this.showEdit = true;
-        if (row?.id) {
-          this.$refs.userEdit.isUpdate = true;
-        } else {
-          this.$refs.userEdit.isUpdate = false;
-        }
+    /* 刷新表格 */
+    reload(where) {
+      this.$refs.table.reload({ page: 1, where: where });
+    },
+    /* 打开编辑弹窗 */
+    openEdit(row) {
+      this.current = row;
+      this.showEdit = true;
+      if (row?.id) {
+        this.$refs.userEdit.isUpdate = true;
+      } else {
+        this.$refs.userEdit.isUpdate = false;
+      }
 
-        this.$refs.userEdit.$refs.form &&
-          this.$refs.userEdit.$refs.form.clearValidate();
-      },
-      /* 打开历史版本 */
-      openHistory(row) {
-        this.$refs.historyRefs.open(row);
-      },
-      /* 删除 */
-      remove(row) {
-        const loading = this.$loading({ lock: true });
+      this.$refs.userEdit.$refs.form &&
+        this.$refs.userEdit.$refs.form.clearValidate();
+    },
+    /* 打开历史版本 */
+    openHistory(row) {
+      this.$refs.historyRefs.open(row);
+    },
+    /* 删除 */
+    remove(row) {
+      const loading = this.$loading({ lock: true });
 
-        route
-          .delete(row.id)
-          .then((msg) => {
-            loading.close();
-            this.$message.success('删除' + msg);
-            this.reload();
-          })
-          .catch((e) => {
-            loading.close();
-            // this.$message.error(e.message);
-          });
-      },
-      /* 批量删除 */
-      removeBatch() {
-        if (!this.selection.length) {
-          this.$message.error('请至少选择一条数据');
-          return;
-        }
-        this.$confirm('确定要删除选中的工序吗?', '提示', {
-          type: 'warning'
+      route
+        .delete(row.id)
+        .then((msg) => {
+          loading.close();
+          this.$message.success('删除' + msg);
+          this.reload();
         })
-          .then(() => {
-            const loading = this.$loading({ lock: true });
-            producetask
-              .delete(this.selection.map((d) => d.id))
-              .then((msg) => {
-                loading.close();
-                this.$message.success('删除' + msg);
-                this.reload();
-              })
-              .catch((e) => {
-                loading.close();
-                // this.$message.error(e.message);
-              });
-          })
-          .catch(() => {});
-      },
-      approve(res) {
-        this.processSubmitDialogFlag = true;
-        this.$nextTick(() => {
-          let params = {
-            businessId: res.id,
-            businessKey: 'routing_approve',
-            formCreateUserId: res.createUserId,
-            routingId: res.id,
-            variables: {
-              businessCode: res.code,
-              businessName: res.name,
-              businessType: ' 版本:' + res.version
-            }
-          };
+        .catch((e) => {
+          loading.close();
+          // this.$message.error(e.message);
+        });
+    },
 
-          this.$refs.processSubmitDialogRef.init(params);
+    //变更
+   alteration(row) {
+      console.log();
+      let param = {
+        id: row.id
+      };
+      route
+        .taskinstanceChange(param)
+        .then((msg) => {
+          // loading.close();
+          this.$message.success('变更' + msg);
+          this.reload();
+        })
+        .catch((e) => {
+          loading.close();
+          // this.$message.error(e.message);
         });
-      },
-      // 刷新数据
-      refreshData() {
-        this.loading = true;
-        route
-          .syncRouting()
-          .then((res) => {
-            if (res == '0') {
-              this.loading = false;
-              this.$message.success('数据刷新成功!');
+    },
+    /* 批量删除 */
+    removeBatch() {
+      if (!this.selection.length) {
+        this.$message.error('请至少选择一条数据');
+        return;
+      }
+      this.$confirm('确定要删除选中的工序吗?', '提示', {
+        type: 'warning'
+      })
+        .then(() => {
+          const loading = this.$loading({ lock: true });
+          producetask
+            .delete(this.selection.map((d) => d.id))
+            .then((msg) => {
+              loading.close();
+              this.$message.success('删除' + msg);
               this.reload();
-            }
-          })
-          .catch((e) => {
+            })
+            .catch((e) => {
+              loading.close();
+              // this.$message.error(e.message);
+            });
+        })
+        .catch(() => {});
+    },
+    approve(res) {
+      this.processSubmitDialogFlag = true;
+      this.$nextTick(() => {
+        let params = {
+          businessId: res.id,
+          businessKey: 'routing_approve',
+          formCreateUserId: res.createUserId,
+          routingId: res.id,
+          variables: {
+            businessCode: res.code,
+            businessName: res.name,
+            businessType: ' 版本:' + res.version
+          }
+        };
+
+        this.$refs.processSubmitDialogRef.init(params);
+      });
+    },
+    // 刷新数据
+    refreshData() {
+      this.loading = true;
+      route
+        .syncRouting()
+        .then((res) => {
+          if (res == '0') {
             this.loading = false;
-          });
-      },
+            this.$message.success('数据刷新成功!');
+            this.reload();
+          }
+        })
+        .catch((e) => {
+          this.loading = false;
+        });
+    },
 
-      openDetail(row) {
-        this.current = row;
-        //
+    openDetail(row) {
+      this.current = row;
+      //
 
-        // this.$refs.userEdit.datasource(this.current.id);
-        this.detailEdit = true;
-      }
+      // this.$refs.userEdit.datasource(this.current.id);
+      this.detailEdit = true;
     }
-  };
+  }
+};
 </script>

+ 2 - 2
vue.config.js

@@ -36,11 +36,11 @@ module.exports = {
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
 
-        target: 'http://192.168.1.125:18086',
+        // 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.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.116:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域