update 0904docs
This commit is contained in:
		@@ -39,9 +39,9 @@
 | 
			
		||||
    <script>
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
 | 
			
		||||
    window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
 | 
			
		||||
    window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
 | 
			
		||||
    // window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
 
 | 
			
		||||
@@ -127,12 +127,12 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleSubEmitData(payload) {
 | 
			
		||||
      console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      //console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      this.$emit("operate-event", payload);
 | 
			
		||||
    },
 | 
			
		||||
    handleSelectionChange(val) {
 | 
			
		||||
      // this.selections = val;
 | 
			
		||||
      console.log("selections change: ", val);
 | 
			
		||||
      //console.log("selections change: ", val);
 | 
			
		||||
      if (this.selectProps.length == 0)
 | 
			
		||||
        this.$emit(
 | 
			
		||||
          "select",
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  created() {},
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
 | 
			
		||||
    //console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
 | 
			
		||||
 | 
			
		||||
    this.headConfig.fields.forEach((field, index) => {
 | 
			
		||||
      // 没有 field.prop ,则为按钮之类的
 | 
			
		||||
@@ -132,7 +132,7 @@ export default {
 | 
			
		||||
      // TODO: 此处也需要修改,碰到具体业务需求才更新...
 | 
			
		||||
      if (field.watch) {
 | 
			
		||||
        // const { index: innerIdx, condition } = field.watch;
 | 
			
		||||
        // console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
 | 
			
		||||
        // //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
 | 
			
		||||
        // // 设置监听器
 | 
			
		||||
        // this.$watch(
 | 
			
		||||
        //   () => this.searchForm[innerIdx],
 | 
			
		||||
@@ -142,19 +142,19 @@ export default {
 | 
			
		||||
        //     // 	queryParams
 | 
			
		||||
        //     // })
 | 
			
		||||
        //     this.$http(field.url, queryParams).then((res) => {
 | 
			
		||||
        //       console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
 | 
			
		||||
        //       //console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
 | 
			
		||||
        //       // 此处是外部的 index
 | 
			
		||||
        //       this.searchForm[index] = Math.floor(Math.random() * 10);
 | 
			
		||||
        //     });
 | 
			
		||||
        //   }
 | 
			
		||||
        // );
 | 
			
		||||
        // console.log("[BaseSearchForm] mounted(): ", this.searchForm);
 | 
			
		||||
        // //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
 | 
			
		||||
        // // 如果此时已经有默认值了,就立马根据这个默认值来发起请求
 | 
			
		||||
        // if (this.searchForm[innerIdx]) {
 | 
			
		||||
        //   // TODO: 这个判断好像不太需要...
 | 
			
		||||
        //   console.log("TODO: 这个判断好像不太需要...");
 | 
			
		||||
        //   //console.log("TODO: 这个判断好像不太需要...");
 | 
			
		||||
        // } else {
 | 
			
		||||
        //   console.log("TODO: 监听的字段还没来得及设置值呢...");
 | 
			
		||||
        //   //console.log("TODO: 监听的字段还没来得及设置值呢...");
 | 
			
		||||
        // }
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@ export default {
 | 
			
		||||
          type: "error",
 | 
			
		||||
          duration: 1500,
 | 
			
		||||
        });
 | 
			
		||||
        console.log("[*] 传入car payload对话框的id是", id);
 | 
			
		||||
        //console.log("[*] 传入car payload对话框的id是", id);
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      this.showPaination = false;
 | 
			
		||||
@@ -130,7 +130,7 @@ export default {
 | 
			
		||||
          params,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[car payload dialog] [http response] res is: ", res);
 | 
			
		||||
          //console.log("[car payload dialog] [http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -183,7 +183,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -199,7 +199,7 @@ export default {
 | 
			
		||||
          //   break;
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -255,7 +255,7 @@ export default {
 | 
			
		||||
    const promiseHistory = {};
 | 
			
		||||
 | 
			
		||||
    const getData = (col, param) => {
 | 
			
		||||
      // console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      // //console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      // 获取数据 - 不需要等待前置条件时
 | 
			
		||||
      promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
@@ -295,13 +295,13 @@ export default {
 | 
			
		||||
 | 
			
		||||
            // 设置监听
 | 
			
		||||
            if ("injectTo" in col) {
 | 
			
		||||
              console.log("set watcher: ", col.prop);
 | 
			
		||||
              //console.log("set watcher: ", col.prop);
 | 
			
		||||
 | 
			
		||||
              const valueProp = "optionValue" in col ? col.optionValue : "id";
 | 
			
		||||
              const unwatch = this.$watch(
 | 
			
		||||
                () => this.dataForm[col.prop],
 | 
			
		||||
                (val) => {
 | 
			
		||||
                  console.log("do watcher: ", col.prop);
 | 
			
		||||
                  //console.log("do watcher: ", col.prop);
 | 
			
		||||
                  if (col.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
                  if (!val) {
 | 
			
		||||
                    col.injectTo.map((item) => {
 | 
			
		||||
@@ -317,7 +317,7 @@ export default {
 | 
			
		||||
                      this.$forceUpdate();
 | 
			
		||||
                    });
 | 
			
		||||
                  } else {
 | 
			
		||||
                    console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                    //console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                  }
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
@@ -356,14 +356,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
            // 设置监听
 | 
			
		||||
            if ("injectTo" in col && !col.watcher) {
 | 
			
		||||
              console.log("set watcher: ", col.prop);
 | 
			
		||||
              //console.log("set watcher: ", col.prop);
 | 
			
		||||
 | 
			
		||||
              const valueProp = "optionValue" in col ? col.optionValue : "id";
 | 
			
		||||
              const unwatch = this.$watch(
 | 
			
		||||
                () => this.dataForm[col.prop],
 | 
			
		||||
                (val) => {
 | 
			
		||||
                  if (col.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
                  console.log("do watcher: ", col.prop);
 | 
			
		||||
                  //console.log("do watcher: ", col.prop);
 | 
			
		||||
                  if (!val) {
 | 
			
		||||
                    col.injectTo.map((item) => {
 | 
			
		||||
                      this.$set(this.dataForm, item[0], null);
 | 
			
		||||
@@ -378,7 +378,7 @@ export default {
 | 
			
		||||
                      this.$forceUpdate();
 | 
			
		||||
                    });
 | 
			
		||||
                  } else {
 | 
			
		||||
                    console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                    //console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                  }
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
@@ -399,16 +399,16 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      console.log("after getData: ", promiseHistory);
 | 
			
		||||
      //console.log("after getData: ", promiseHistory);
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /** 处理函数 */
 | 
			
		||||
    const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
 | 
			
		||||
      console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
 | 
			
		||||
      //console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
 | 
			
		||||
      /** 此时 cachedList 已经确保可用了 */
 | 
			
		||||
      const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
 | 
			
		||||
      const param = target ? target[targetField] : "";
 | 
			
		||||
      console.log("((( chosenObject )))", target);
 | 
			
		||||
      //console.log("((( chosenObject )))", target);
 | 
			
		||||
 | 
			
		||||
      getData(col, param);
 | 
			
		||||
    };
 | 
			
		||||
@@ -427,13 +427,13 @@ export default {
 | 
			
		||||
      row.forEach((col) => {
 | 
			
		||||
        if (col == null) return;
 | 
			
		||||
        if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
 | 
			
		||||
          console.log("[hasPrev] set watcher: ", col.hasPrev);
 | 
			
		||||
          //console.log("[hasPrev] set watcher: ", col.hasPrev);
 | 
			
		||||
 | 
			
		||||
          // 获取数据 - 需要等待前置条件时
 | 
			
		||||
          const unwatch = this.$watch(
 | 
			
		||||
            () => this.dataForm[col.hasPrev],
 | 
			
		||||
            (val) => {
 | 
			
		||||
              console.log("[hasPrev] do watcher: ", col.hasPrev);
 | 
			
		||||
              //console.log("[hasPrev] do watcher: ", col.hasPrev);
 | 
			
		||||
              if (!val) {
 | 
			
		||||
                col.injectTo.map((item) => {
 | 
			
		||||
                  this.$set(this.dataForm, item[0], null);
 | 
			
		||||
@@ -467,11 +467,11 @@ export default {
 | 
			
		||||
    if (this.configs.extraFields)
 | 
			
		||||
      this.configs.extraFields.forEach((cnf) => {
 | 
			
		||||
        if (cnf.listenTo) {
 | 
			
		||||
          console.log("set watcher for: ", cnf.prop);
 | 
			
		||||
          //console.log("set watcher for: ", cnf.prop);
 | 
			
		||||
          const unwatch = this.$watch(
 | 
			
		||||
            () => this.dataForm[cnf.listenTo.prop],
 | 
			
		||||
            (carId) => {
 | 
			
		||||
              console.log("do watcher for: ", cnf.prop);
 | 
			
		||||
              //console.log("do watcher for: ", cnf.prop);
 | 
			
		||||
              if (!carId) return;
 | 
			
		||||
              if (cnf.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
              cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
 | 
			
		||||
@@ -527,14 +527,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
    resetSpecificFields(fields) {
 | 
			
		||||
      Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
        // console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
 | 
			
		||||
        // //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
 | 
			
		||||
        if (fields.indexOf(key) !== -1) {
 | 
			
		||||
          // console.log(`key ${key} in fields`)
 | 
			
		||||
          // //console.log(`key ${key} in fields`)
 | 
			
		||||
          // this.dataForm[key] = null;
 | 
			
		||||
          this.$set(this.dataForm, key, null);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      console.log("this.dataform", this.dataForm);
 | 
			
		||||
      //console.log("this.dataform", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    resetForm(excludeId = false, immediate = false) {
 | 
			
		||||
@@ -556,9 +556,9 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** init **/
 | 
			
		||||
    init(id, detailMode, tagInfo, extraParams) {
 | 
			
		||||
      // console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      // //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      if (this.$refs.dataForm) {
 | 
			
		||||
        // console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // //console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // 当不是首次渲染dialog的时候,一开始就清空验证信息,本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
 | 
			
		||||
        this.$refs.dataForm.clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
@@ -569,7 +569,7 @@ export default {
 | 
			
		||||
      /** 判断 extraParams */
 | 
			
		||||
      if (extraParams && typeof extraParams === "object") {
 | 
			
		||||
        for (const [key, value] of Object.entries(extraParams)) {
 | 
			
		||||
          // console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
 | 
			
		||||
          // //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
 | 
			
		||||
          this.$set(this.dataForm, key, value);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -602,7 +602,7 @@ export default {
 | 
			
		||||
                    url: file.fileUrl,
 | 
			
		||||
                  }));
 | 
			
		||||
                }
 | 
			
		||||
                // console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
                // //console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: `${res.code}: ${res.msg}`,
 | 
			
		||||
@@ -628,7 +628,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleButtonClick(col) {
 | 
			
		||||
      if (!("onClick" in col)) {
 | 
			
		||||
        console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
 | 
			
		||||
        //console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -639,7 +639,7 @@ export default {
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      if ("autoUpdateProp" in col) {
 | 
			
		||||
        // 自动更新 相关联 的字段
 | 
			
		||||
        // console.log(col.options, eventValue, this.savedDatalist);
 | 
			
		||||
        // //console.log(col.options, eventValue, this.savedDatalist);
 | 
			
		||||
        const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
 | 
			
		||||
        this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
 | 
			
		||||
      }
 | 
			
		||||
@@ -647,17 +647,17 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    addOrUpdate(method = "POST", url) {
 | 
			
		||||
      if ("parentId" in this.dataForm) {
 | 
			
		||||
        console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        // 对特殊的键做特殊处理,如 parentId 是一个 cascader,获取的值是 ["xxx"],后端只需要xxx
 | 
			
		||||
        const lastItem = this.dataForm.parentId.length - 1;
 | 
			
		||||
        this.dataForm.parentId = this.dataForm.parentId[lastItem];
 | 
			
		||||
@@ -709,7 +709,7 @@ export default {
 | 
			
		||||
            data: httpPayload,
 | 
			
		||||
          })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              console.log("[add&update] res is: ", res);
 | 
			
		||||
              //console.log("[add&update] res is: ", res);
 | 
			
		||||
              this.loadingStatus = false;
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$message.success(method === "POST" ? "添加成功" : "更新成功");
 | 
			
		||||
@@ -735,7 +735,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -747,7 +747,7 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
          case "resetSpecific":
 | 
			
		||||
            // qualityInspectionRecord config 里引用
 | 
			
		||||
            console.log("resetFields", this.resetFields);
 | 
			
		||||
            //console.log("resetFields", this.resetFields);
 | 
			
		||||
            this.resetSpecificFields(this.resetFields);
 | 
			
		||||
            break;
 | 
			
		||||
          case "add":
 | 
			
		||||
@@ -762,18 +762,18 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
          }
 | 
			
		||||
          case "add-car-payload": {
 | 
			
		||||
            console.log("edit-car-payload", payload);
 | 
			
		||||
            //console.log("edit-car-payload", payload);
 | 
			
		||||
            this.addOrUpdate("POST", this.urls.payloadFormUrl);
 | 
			
		||||
            break;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -137,7 +137,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSuccess(response, file, fileList) {
 | 
			
		||||
      console.log("success response", response);
 | 
			
		||||
      //console.log("success response", response);
 | 
			
		||||
      this.loadingStatus = false
 | 
			
		||||
      try {
 | 
			
		||||
        if ("code" in response && response.code === 500) {
 | 
			
		||||
@@ -178,7 +178,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleError(err, file, fileList) {
 | 
			
		||||
      this.loadingStatus = false
 | 
			
		||||
      console.log("err", err);
 | 
			
		||||
      //console.log("err", err);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
@@ -211,7 +211,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      // console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      // //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -294,7 +294,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
        if (col.fetchData)
 | 
			
		||||
          col.fetchData().then(({ data: res }) => {
 | 
			
		||||
            console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
 | 
			
		||||
            //console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
 | 
			
		||||
            if (res.code === 0) {
 | 
			
		||||
              if (col.cacheFetchedData) {
 | 
			
		||||
                // cache fetched data
 | 
			
		||||
@@ -356,7 +356,7 @@ export default {
 | 
			
		||||
        else if (col.fetchTreeData) {
 | 
			
		||||
          // 获取设备类型时触发的,用于前端构建属性结构,约定,parentId 为0时是顶级节点
 | 
			
		||||
          col.fetchTreeData().then(({ data: res }) => {
 | 
			
		||||
            console.log("[Fetch Tree Data]", res.data);
 | 
			
		||||
            //console.log("[Fetch Tree Data]", res.data);
 | 
			
		||||
            if (res.code === 0) {
 | 
			
		||||
              // 先把数据先重构成一个对象
 | 
			
		||||
              const obj = {};
 | 
			
		||||
@@ -372,7 +372,7 @@ export default {
 | 
			
		||||
              }
 | 
			
		||||
              // 再过滤这个对象
 | 
			
		||||
              let filteredList = reConstructTreeData(obj);
 | 
			
		||||
              console.log("** filteredList **", filteredList);
 | 
			
		||||
              //console.log("** filteredList **", filteredList);
 | 
			
		||||
              // 最后设置 options
 | 
			
		||||
              this.$set(col, "options", filteredList);
 | 
			
		||||
            } else {
 | 
			
		||||
@@ -442,12 +442,12 @@ export default {
 | 
			
		||||
            () => this.dataForm[col.prop],
 | 
			
		||||
            (val) => {
 | 
			
		||||
              if (val && col.prop in this.cached) {
 | 
			
		||||
                console.log(
 | 
			
		||||
                  "here changeReflects",
 | 
			
		||||
                  col.prop,
 | 
			
		||||
                  col.changeReflects.toProp,
 | 
			
		||||
                  this.cached[col.prop]
 | 
			
		||||
                );
 | 
			
		||||
                //console.log(
 | 
			
		||||
                //   "here changeReflects",
 | 
			
		||||
                //   col.prop,
 | 
			
		||||
                //   col.changeReflects.toProp,
 | 
			
		||||
                //   this.cached[col.prop]
 | 
			
		||||
                // );
 | 
			
		||||
                if (typeof col.changeReflects.fromKey === "string") {
 | 
			
		||||
                  this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(
 | 
			
		||||
                    (item) => item.id === val
 | 
			
		||||
@@ -461,7 +461,7 @@ export default {
 | 
			
		||||
                    this.dataForm[col.changeReflects.toProp] = values.join(col.changeReflects.delimiter);
 | 
			
		||||
                  } else {
 | 
			
		||||
                    this.dataForm[col.changeReflects.toProp] = col.changeReflects.delimiter;
 | 
			
		||||
                    console.log("[DialogWithMenu] mounted() 没找到对应数据");
 | 
			
		||||
                    //console.log("[DialogWithMenu] mounted() 没找到对应数据");
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
@@ -528,7 +528,7 @@ export default {
 | 
			
		||||
      setTimeout(
 | 
			
		||||
        () => {
 | 
			
		||||
          Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
            console.log("reset form, key", key);
 | 
			
		||||
            //console.log("reset form, key", key);
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            if ("files" in this.dataForm) this.dataForm.files = [];
 | 
			
		||||
            else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
 | 
			
		||||
@@ -539,7 +539,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
          this.activeMenu = this.configs.menu[0].name;
 | 
			
		||||
          this.$refs.dataForm[0].resetFields();
 | 
			
		||||
          console.log("清除Form...", this.dataForm);
 | 
			
		||||
          //console.log("清除Form...", this.dataForm);
 | 
			
		||||
        },
 | 
			
		||||
        immediate ? 0 : 200
 | 
			
		||||
      );
 | 
			
		||||
@@ -549,7 +549,7 @@ export default {
 | 
			
		||||
      return new Promise((resolve, reject) => {
 | 
			
		||||
        if (this.watingToRefreshQueue.length) {
 | 
			
		||||
          this.watingToRefreshQueue.forEach((opt) => {
 | 
			
		||||
            console.log("[刷新数据, ", opt, "]");
 | 
			
		||||
            //console.log("[刷新数据, ", opt, "]");
 | 
			
		||||
            if ("fetchData" in opt) {
 | 
			
		||||
              opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => {
 | 
			
		||||
                if (res.code === 0) {
 | 
			
		||||
@@ -585,7 +585,7 @@ export default {
 | 
			
		||||
        // 当不是首次渲染dialog的时候,一开始就清空验证信息,本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
 | 
			
		||||
        this.$refs.dataForm[0].clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
      console.log("[dialog] DialogWithHead init():", id, detailMode);
 | 
			
		||||
      //console.log("[dialog] DialogWithHead init():", id, detailMode);
 | 
			
		||||
 | 
			
		||||
      this.detailMode = detailMode ?? false;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
@@ -601,11 +601,11 @@ export default {
 | 
			
		||||
              this.$http.get(this.urls.base + `/${this.dataForm.id}`).then(({ data: res }) => {
 | 
			
		||||
                if (res && res.code === 0) {
 | 
			
		||||
                  const dataFormKeys = Object.keys(this.dataForm);
 | 
			
		||||
                  console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
                  //console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
 | 
			
		||||
                  this.dataForm = __pick(res.data, dataFormKeys);
 | 
			
		||||
                  if ("files" in res.data) {
 | 
			
		||||
                    console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                    //console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                    /** 返回的文件列表 */
 | 
			
		||||
                    this.fileList = res.data.files
 | 
			
		||||
                      ? res.data.files.map((file) => ({
 | 
			
		||||
@@ -646,7 +646,7 @@ export default {
 | 
			
		||||
              responseType: "blob",
 | 
			
		||||
            })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              console.log("preivew", res);
 | 
			
		||||
              //console.log("preivew", res);
 | 
			
		||||
              if (/image/i.test(res.type)) {
 | 
			
		||||
                // 显示图片
 | 
			
		||||
                this.currentImgUrl = URL.createObjectURL(res);
 | 
			
		||||
@@ -657,9 +657,9 @@ export default {
 | 
			
		||||
                a.setAttribute("target", "_blank");
 | 
			
		||||
                a.href = URL.createObjectURL(res);
 | 
			
		||||
                a.click();
 | 
			
		||||
                console.log("before remove a ", a);
 | 
			
		||||
                //console.log("before remove a ", a);
 | 
			
		||||
                a.remove();
 | 
			
		||||
                console.log("removed a ", a);
 | 
			
		||||
                //console.log("removed a ", a);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "非图片和PDF文件请下载后预览",
 | 
			
		||||
@@ -739,7 +739,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
      console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
      //console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
 | 
			
		||||
      if (response.code === 0) {
 | 
			
		||||
        const uploadedFile = response.data[0];
 | 
			
		||||
@@ -779,7 +779,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadCheck(file) {
 | 
			
		||||
      console.log("[before upload]", file);
 | 
			
		||||
      //console.log("[before upload]", file);
 | 
			
		||||
      const LIMIT = 2 * 1024 * 1024; // bytes
 | 
			
		||||
      if (file.size > LIMIT) {
 | 
			
		||||
        this.$message({
 | 
			
		||||
@@ -793,16 +793,16 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      //console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
    },
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -843,7 +843,7 @@ export default {
 | 
			
		||||
                //   this.configs.excludeProps.forEach((prop) => {
 | 
			
		||||
                //     delete actualPayload[prop];
 | 
			
		||||
                //   });
 | 
			
		||||
                //   console.log('actualPayload', actualPayload);
 | 
			
		||||
                //   //console.log('actualPayload', actualPayload);
 | 
			
		||||
                // }
 | 
			
		||||
 | 
			
		||||
                // 实际发送请求
 | 
			
		||||
@@ -859,7 +859,7 @@ export default {
 | 
			
		||||
                  .then(({ data: res }) => {
 | 
			
		||||
                    this.btnLoading = false;
 | 
			
		||||
                    this.loadingStatus = false;
 | 
			
		||||
                    console.log("[add&update] res is: ", res);
 | 
			
		||||
                    //console.log("[add&update] res is: ", res);
 | 
			
		||||
                    if (res.code === 0) {
 | 
			
		||||
                      this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
 | 
			
		||||
                      this.$emit("refreshDataList");
 | 
			
		||||
@@ -868,7 +868,7 @@ export default {
 | 
			
		||||
                      // if (this.watingToRefreshQueue.length) {
 | 
			
		||||
                      //   // 刷新队列
 | 
			
		||||
                      //   this.watingToRefreshQueue.forEach((opt) => {
 | 
			
		||||
                      //     console.log("[刷新数据, ", opt, "]");
 | 
			
		||||
                      //     //console.log("[刷新数据, ", opt, "]");
 | 
			
		||||
                      //     if ("fetchData" in opt) {
 | 
			
		||||
                      //       opt.fetchData().then(({ data: res }) => {
 | 
			
		||||
                      //         if (res.code === 0) {
 | 
			
		||||
@@ -909,7 +909,7 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleTabClick(payload) {
 | 
			
		||||
      //   console.log("tab click payload: ", this.activeMenu);
 | 
			
		||||
      //   //console.log("tab click payload: ", this.activeMenu);
 | 
			
		||||
      //   if (this.activeMenu === this.configs.menu[1].name) {
 | 
			
		||||
      //     // 获取数据
 | 
			
		||||
      //     this.getSubList();
 | 
			
		||||
@@ -947,7 +947,7 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
 | 
			
		||||
        console.log("[DialogWithMenu] getSubList:", res);
 | 
			
		||||
        //console.log("[DialogWithMenu] getSubList:", res);
 | 
			
		||||
        if (res.code === 0 && res.data?.list) {
 | 
			
		||||
          // 有数据
 | 
			
		||||
          this.subList = res.data.list;
 | 
			
		||||
@@ -973,19 +973,19 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 列表handlers */
 | 
			
		||||
    handleAddItem() {
 | 
			
		||||
      // console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      // //console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      this.showBaseDialog = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
        //console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    handleTableRowOperate({ type, data }) {
 | 
			
		||||
      console.log("handleTableRowOperate", type, data);
 | 
			
		||||
      //console.log("handleTableRowOperate", type, data);
 | 
			
		||||
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "delete": {
 | 
			
		||||
          // 确认是否删除
 | 
			
		||||
          console.log("delete....", data);
 | 
			
		||||
          //console.log("delete....", data);
 | 
			
		||||
          const itemName =
 | 
			
		||||
            typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
 | 
			
		||||
          return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
 | 
			
		||||
 
 | 
			
		||||
@@ -194,7 +194,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
      this.dataForm = res.data;
 | 
			
		||||
      await this.printByLocalData(res.data);
 | 
			
		||||
      await this.getPrintStatus(id);
 | 
			
		||||
      // this.getPrintStatus(id);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    async printByLocalData(data) {
 | 
			
		||||
@@ -202,7 +202,7 @@ export default {
 | 
			
		||||
      this.paintBarCode(data.packTechCode || "0000-0000-0000");
 | 
			
		||||
      // 绘制HU号
 | 
			
		||||
      await this.paintQrCode(data.hu || "- 无HU数据 -");
 | 
			
		||||
      await this.handlePrint();
 | 
			
		||||
      this.handlePrint();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    initPrintPlugin() {
 | 
			
		||||
@@ -245,70 +245,87 @@ export default {
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    // handlePrint() {
 | 
			
		||||
    //   return new Promise((resolve, reject) => {
 | 
			
		||||
    //     this.lodop.PRINT_INIT("RGV小票打印");
 | 
			
		||||
    //     // 捕获打印状态
 | 
			
		||||
    //     this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
 | 
			
		||||
    //     if (this.lodop.CVERSION) {
 | 
			
		||||
    //       // 获取jobId
 | 
			
		||||
    //       this.lodop.On_Return = (TaskID, Value) => {
 | 
			
		||||
    //         this.jobId = Value;
 | 
			
		||||
    //         resolve();
 | 
			
		||||
    //       };
 | 
			
		||||
    //     }
 | 
			
		||||
    //     // 纵向打印,宽度60mm,高度150mm,定义纸张名称
 | 
			
		||||
    //     this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
 | 
			
		||||
    //     this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
 | 
			
		||||
    //     this.lodop.PRINT();
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
 | 
			
		||||
    // getPrintStatus(id) {
 | 
			
		||||
    //   return new Promise((resolve, reject) => {
 | 
			
		||||
    //     if (!this.jobId || !this.lodop) reject(-1);
 | 
			
		||||
    //     this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
 | 
			
		||||
    //     if (this.lodop.CVERSION) {
 | 
			
		||||
    //       this.lodop.On_Return = (TaskID, Value) => {
 | 
			
		||||
    //         //console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId, Value);
 | 
			
		||||
    //         if (Value.toString() == "1") {
 | 
			
		||||
    //           // 打印成功
 | 
			
		||||
    //           this.sendSuccess()
 | 
			
		||||
    //             .then(() => {
 | 
			
		||||
    //               this.$message.success(`打印 ${id} 成功`);
 | 
			
		||||
    //               this.$emit("refresh-list");
 | 
			
		||||
    //               resolve();
 | 
			
		||||
    //             })
 | 
			
		||||
    //             .catch((err) => {
 | 
			
		||||
    //               this.$message.error(err);
 | 
			
		||||
    //               reject(err);
 | 
			
		||||
    //             });
 | 
			
		||||
    //         } else {
 | 
			
		||||
    //           this.$message.error(`打印 ${id} 失败`);
 | 
			
		||||
    //         }
 | 
			
		||||
    //       };
 | 
			
		||||
    //       this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
 | 
			
		||||
    handlePrint() {
 | 
			
		||||
      return new Promise((resolve, reject) => {
 | 
			
		||||
        this.lodop.PRINT_INIT("RGV小票打印");
 | 
			
		||||
        // 捕获打印状态
 | 
			
		||||
        this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
 | 
			
		||||
        if (this.lodop.CVERSION) {
 | 
			
		||||
          // 获取jobId
 | 
			
		||||
          this.lodop.On_Return = (TaskID, Value) => {
 | 
			
		||||
            this.jobId = Value;
 | 
			
		||||
            // this.$nextTick(() => {
 | 
			
		||||
            //   this.getPrintStatus(resolve, reject);
 | 
			
		||||
            // });
 | 
			
		||||
            console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId);
 | 
			
		||||
            resolve();
 | 
			
		||||
          };
 | 
			
		||||
        }
 | 
			
		||||
        // 纵向打印,宽度60mm,高度150mm,定义纸张名称
 | 
			
		||||
        this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
 | 
			
		||||
        this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
 | 
			
		||||
        this.lodop.PRINT();
 | 
			
		||||
      });
 | 
			
		||||
      this.lodop.PRINT_INIT("RGV小票打印");
 | 
			
		||||
 | 
			
		||||
      // 纵向打印,宽度60mm,高度150mm,定义纸张名称
 | 
			
		||||
      this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
 | 
			
		||||
      this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
 | 
			
		||||
      this.lodop.PRINT();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getPrintStatus(id) {
 | 
			
		||||
      return new Promise((resolve, reject) => {
 | 
			
		||||
        if (!this.jobId || !this.lodop) reject(-1);
 | 
			
		||||
        this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
 | 
			
		||||
        if (this.lodop.CVERSION) {
 | 
			
		||||
          this.lodop.On_Return = (TaskID, Value) => {
 | 
			
		||||
            console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId, Value);
 | 
			
		||||
            if (Value.toString() == "1") {
 | 
			
		||||
              // 打印成功
 | 
			
		||||
              this.sendSuccess()
 | 
			
		||||
                .then(() => {
 | 
			
		||||
                  this.$message.success(`打印 ${id} 成功`);
 | 
			
		||||
                  this.$emit("refresh-list");
 | 
			
		||||
                  resolve();
 | 
			
		||||
                })
 | 
			
		||||
                .catch((err) => {
 | 
			
		||||
                  this.$message.error(err);
 | 
			
		||||
                  reject(err);
 | 
			
		||||
                });
 | 
			
		||||
            } else {
 | 
			
		||||
              this.$message.error(`打印 ${id} 失败`);
 | 
			
		||||
            }
 | 
			
		||||
          };
 | 
			
		||||
          this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getPrintStatus(id) {
 | 
			
		||||
    //   // 打印成功
 | 
			
		||||
    //   this.sendSuccess()
 | 
			
		||||
    //     .then(() => {
 | 
			
		||||
    //       this.$message.success(`打印 ${id} 成功`);
 | 
			
		||||
    //       this.$emit("refresh-list");
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch((err) => {
 | 
			
		||||
    //       this.$message.error("code" in err && "msg" in err ? `${err.code}: ${err.msg}` : err);
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
 | 
			
		||||
    sendSuccess() {
 | 
			
		||||
      return this.$http({
 | 
			
		||||
        url: "/pms/pallet/print",
 | 
			
		||||
        method: "post",
 | 
			
		||||
        data: this.palletId,
 | 
			
		||||
        headers: {
 | 
			
		||||
          "Content-Type": "application/json",
 | 
			
		||||
        },
 | 
			
		||||
      }).then(({ data: res }) => {
 | 
			
		||||
        if (res.code == 0) return;
 | 
			
		||||
        else throw new Error(res.msg);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // sendSuccess() {
 | 
			
		||||
    //   return this.$http({
 | 
			
		||||
    //     url: "/pms/pallet/print",
 | 
			
		||||
    //     method: "post",
 | 
			
		||||
    //     data: this.palletId,
 | 
			
		||||
    //     headers: {
 | 
			
		||||
    //       "Content-Type": "application/json",
 | 
			
		||||
    //     },
 | 
			
		||||
    //   }).then(({ data: res }) => {
 | 
			
		||||
    //     if (res.code == 0) return;
 | 
			
		||||
    //     else throw new Error(res.msg);
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
 | 
			
		||||
    close() {
 | 
			
		||||
      this.$emit("destroy");
 | 
			
		||||
 
 | 
			
		||||
@@ -206,7 +206,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "edit":
 | 
			
		||||
          this.mode = "form";
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ export default {
 | 
			
		||||
    this.configs.rows.forEach((row) => {
 | 
			
		||||
      row.forEach((col) => {
 | 
			
		||||
        dataForm[col.prop] = col.default ?? "";
 | 
			
		||||
        console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
 | 
			
		||||
        //console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
 | 
			
		||||
 | 
			
		||||
        if (typeof col.fetchData === "function")
 | 
			
		||||
          col.fetchData().then(({ data: res }) => {
 | 
			
		||||
@@ -119,13 +119,13 @@ export default {
 | 
			
		||||
                      [col.customLabel]: item[col.customLabel],
 | 
			
		||||
                    }))
 | 
			
		||||
              );
 | 
			
		||||
              console.log(
 | 
			
		||||
                res.data.list.map((item) => ({
 | 
			
		||||
                  label: item.name,
 | 
			
		||||
                  value: item.id,
 | 
			
		||||
                  [col.customLabel]: item[col.customLabel],
 | 
			
		||||
                }))
 | 
			
		||||
              );
 | 
			
		||||
              //console.log(
 | 
			
		||||
                // res.data.list.map((item) => ({
 | 
			
		||||
                //   label: item.name,
 | 
			
		||||
                //   value: item.id,
 | 
			
		||||
                //   [col.customLabel]: item[col.customLabel],
 | 
			
		||||
                // }))
 | 
			
		||||
              // );
 | 
			
		||||
            } else {
 | 
			
		||||
              this.$set(col, "options", []);
 | 
			
		||||
            }
 | 
			
		||||
@@ -156,7 +156,7 @@ export default {
 | 
			
		||||
    resetForm(excludeId = false) {
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
          // console.log(">>> clearing key: ", key);
 | 
			
		||||
          // //console.log(">>> clearing key: ", key);
 | 
			
		||||
          if (excludeId && key === "id") return;
 | 
			
		||||
          this.dataForm[key] = null;
 | 
			
		||||
        });
 | 
			
		||||
@@ -165,7 +165,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    init(id, isdetail = false) {
 | 
			
		||||
      // console.log("[small dialog] init", id, isdetail);
 | 
			
		||||
      // //console.log("[small dialog] init", id, isdetail);
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
 | 
			
		||||
      this.detailMode = isdetail;
 | 
			
		||||
@@ -201,8 +201,8 @@ export default {
 | 
			
		||||
    handleSwitchChange() {},
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      console.log("configs", this.configs);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("configs", this.configs);
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
          case "cancel":
 | 
			
		||||
@@ -213,7 +213,7 @@ export default {
 | 
			
		||||
            this.$refs.dataForm.validate((passed, result) => {
 | 
			
		||||
              if (passed) {
 | 
			
		||||
                this.btnLoading = true;
 | 
			
		||||
                console.log("update extraParam: ", this.configs.extraParam);
 | 
			
		||||
                //console.log("update extraParam: ", this.configs.extraParam);
 | 
			
		||||
                const method = payload.name === "add" ? "POST" : "PUT";
 | 
			
		||||
 | 
			
		||||
                const fields = {};
 | 
			
		||||
@@ -229,7 +229,7 @@ export default {
 | 
			
		||||
                    ...fields,
 | 
			
		||||
                  },
 | 
			
		||||
                }).then(({ data: res }) => {
 | 
			
		||||
                  console.log("[add&update] res is: ", res);
 | 
			
		||||
                  //console.log("[add&update] res is: ", res);
 | 
			
		||||
                  this.btnLoading = false;
 | 
			
		||||
                  if (res.code === 0) {
 | 
			
		||||
                    this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
 | 
			
		||||
@@ -242,7 +242,7 @@ export default {
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    emitClick() {
 | 
			
		||||
      // console.log('inject data:' ,this.injectData)
 | 
			
		||||
      // //console.log('inject data:' ,this.injectData)
 | 
			
		||||
      this.$emit('emit-data', {
 | 
			
		||||
        type: this.injectData.head?.actionName || 'view-detail-action',
 | 
			
		||||
        data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
 | 
			
		||||
@@ -25,7 +25,7 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  render: function (h) {
 | 
			
		||||
    // console.log('button content:', this.injectData)
 | 
			
		||||
    // //console.log('button content:', this.injectData)
 | 
			
		||||
    return h('span', null, [h('el-button', { props: { type: 'text' }, style: { padding: 0, margin: '5px 0' }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -53,7 +53,7 @@ export default {
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // mounted() {
 | 
			
		||||
  //   console.log('inject data', this.injectData)
 | 
			
		||||
  //   //console.log('inject data', this.injectData)
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 发射事件
 | 
			
		||||
@@ -94,7 +94,7 @@ export default {
 | 
			
		||||
          if ("enable" in opt && typeof opt.enable === "function") {
 | 
			
		||||
            shouldDisabled = !opt.enable(this.injectData);
 | 
			
		||||
          }
 | 
			
		||||
          // console.log('should disabled', shouldDisabled)
 | 
			
		||||
          // //console.log('should disabled', shouldDisabled)
 | 
			
		||||
          btns.push(
 | 
			
		||||
            h(
 | 
			
		||||
              "el-button",
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // modelValue(val) {
 | 
			
		||||
    //   // 这样不行,会导致编辑时富文本内容是反过来的...
 | 
			
		||||
    //   console.log('[modelValue] val is: ', val)
 | 
			
		||||
    //   //console.log('[modelValue] val is: ', val)
 | 
			
		||||
    //   this.editor && this.editor.setContents(JSON.parse(val), "user")
 | 
			
		||||
    // }
 | 
			
		||||
    modelValue(val) {
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    emitClick() {
 | 
			
		||||
      // console.log('inject data:' ,this.injectData)
 | 
			
		||||
      // //console.log('inject data:' ,this.injectData)
 | 
			
		||||
      this.$emit('emit-data', {
 | 
			
		||||
        type: this.injectData.head?.actionName || 'select-change-action',
 | 
			
		||||
        data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
 | 
			
		||||
@@ -24,7 +24,7 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  render: function (h) {
 | 
			
		||||
    // console.log('button content:', this.injectData)
 | 
			
		||||
    // //console.log('button content:', this.injectData)
 | 
			
		||||
    return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -49,7 +49,7 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // console.log("[component] StatusComponent: ", this.injectData);
 | 
			
		||||
    // //console.log("[component] StatusComponent: ", this.injectData);
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 发射事件
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ export default {
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // console.log("[SwitchBtn] injectData: ", this.injectData);
 | 
			
		||||
    // //console.log("[SwitchBtn] injectData: ", this.injectData);
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    status: {
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,7 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    fileList(val) {
 | 
			
		||||
      if (val) {
 | 
			
		||||
        console.log("[FileList] fileList prop:", val);
 | 
			
		||||
        //console.log("[FileList] fileList prop:", val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
@@ -82,7 +82,7 @@ export default {
 | 
			
		||||
          responseType: "blob",
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("preivew", res);
 | 
			
		||||
          //console.log("preivew", res);
 | 
			
		||||
          if (/image/i.test(res.type) || /pdf/i.test(res.type)) {
 | 
			
		||||
            let a = document.createElement('a')
 | 
			
		||||
            a.setAttribute('target', '_blank')
 | 
			
		||||
@@ -100,7 +100,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    },
 | 
			
		||||
    handleDownload(file) {
 | 
			
		||||
      console.log("[FileList] handleDownload", file);
 | 
			
		||||
      //console.log("[FileList] handleDownload", file);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get("/pms/attachment/downloadFile", {
 | 
			
		||||
          params: {
 | 
			
		||||
@@ -136,12 +136,12 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    handleDelete(file) {
 | 
			
		||||
      console.log("[FileList] handleDelete", file);
 | 
			
		||||
      //console.log("[FileList] handleDelete", file);
 | 
			
		||||
      // TODO: 警示删除操作
 | 
			
		||||
      this.$emit("delete-a-file", file.id);
 | 
			
		||||
    },
 | 
			
		||||
    handleSearchClick() {
 | 
			
		||||
      console.log("[FileList] handleSearchClick()");
 | 
			
		||||
      //console.log("[FileList] handleSearchClick()");
 | 
			
		||||
      this.showSearchInput = true;
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -77,12 +77,12 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
 | 
			
		||||
    //console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
 | 
			
		||||
    this.uploadedFileList = this.fileList ?? [];
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleRemoveFile(fileId) {
 | 
			
		||||
      console.log("[UploadBtn] handleRemoveFile", fileId);
 | 
			
		||||
      //console.log("[UploadBtn] handleRemoveFile", fileId);
 | 
			
		||||
      this.$confirm("确定删除此文件?", "提示", {
 | 
			
		||||
        confirmButtonText: "确定",
 | 
			
		||||
        cancelButtonText: "取消",
 | 
			
		||||
@@ -112,7 +112,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
      console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
 | 
			
		||||
      //console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
 | 
			
		||||
 | 
			
		||||
      if (response.code === 0) {
 | 
			
		||||
        const uploadedFile = response.data[0];
 | 
			
		||||
 
 | 
			
		||||
@@ -70,14 +70,14 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmit() {
 | 
			
		||||
      console.log('in minxin basic-page dataformsubmit')
 | 
			
		||||
      //console.log('in minxin basic-page dataformsubmit')
 | 
			
		||||
      this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
        if (!valid) {
 | 
			
		||||
          return false;
 | 
			
		||||
        }
 | 
			
		||||
        this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            // console.log('[confirm] here...')
 | 
			
		||||
            // //console.log('[confirm] here...')
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -103,7 +103,7 @@ export default {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === "delete") {
 | 
			
		||||
        console.log('va', val)
 | 
			
		||||
        //console.log('va', val)
 | 
			
		||||
        this.deleteHandle(val.data.id, val.data.name)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
@@ -151,7 +151,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    handleCancel() {
 | 
			
		||||
@@ -165,7 +165,7 @@ export default {
 | 
			
		||||
    refreshLocalstorage() {
 | 
			
		||||
      // 刷新数据字典数据
 | 
			
		||||
      this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
 | 
			
		||||
        // console.log("[dictData] loading...", res);
 | 
			
		||||
        // //console.log("[dictData] loading...", res);
 | 
			
		||||
        if (res.code === 0 && res.data) {
 | 
			
		||||
          let dictList = {}
 | 
			
		||||
          res.data.map(item => {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ function m(url, type, fn) {
 | 
			
		||||
 | 
			
		||||
m(carManagement.url, carManagement.type, opt => {
 | 
			
		||||
  let { limit, page } = JSON.parse(opt.body)
 | 
			
		||||
  // console.log('limit, page', limit, page, opt.body)
 | 
			
		||||
  // //console.log('limit, page', limit, page, opt.body)
 | 
			
		||||
  // limit = 5
 | 
			
		||||
  return {
 | 
			
		||||
    code: 0,
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ const http = axios.create({
 | 
			
		||||
http.interceptors.request.use(config => {
 | 
			
		||||
  config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
 | 
			
		||||
  config.headers['token'] = 'token' in config.headers ? config.headers.token : (Cookies.get('token') || '')
 | 
			
		||||
  // console.log('[request interceptor] token is:', config.headers['token'])
 | 
			
		||||
  // //console.log('[request interceptor] token is:', config.headers['token'])
 | 
			
		||||
  // 默认参数
 | 
			
		||||
  var defaults = {}
 | 
			
		||||
  // 防止缓存,GET请求默认带_t参数
 | 
			
		||||
 
 | 
			
		||||
@@ -115,7 +115,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("list view with ehad activated..........");
 | 
			
		||||
    //console.log("list view with ehad activated..........");
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
@@ -182,7 +182,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -232,7 +232,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -289,7 +289,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "status": {
 | 
			
		||||
          console.log("status", data);
 | 
			
		||||
          //console.log("status", data);
 | 
			
		||||
          // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
          const { id, code } = data;
 | 
			
		||||
          const queryCondition = { id, code };
 | 
			
		||||
@@ -318,7 +318,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "to-bom-detail": {
 | 
			
		||||
          // console.log('to-bom-detail', data.name)
 | 
			
		||||
          // //console.log('to-bom-detail', data.name)
 | 
			
		||||
          // 查看配方详情
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-bomDetails",
 | 
			
		||||
@@ -386,7 +386,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "preview": {
 | 
			
		||||
          console.log("[PREVIEW] data", data);
 | 
			
		||||
          //console.log("[PREVIEW] data", data);
 | 
			
		||||
          // report preview
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportPreview",
 | 
			
		||||
@@ -396,7 +396,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "design": {
 | 
			
		||||
          console.log("[DESIGN] data", data);
 | 
			
		||||
          //console.log("[DESIGN] data", data);
 | 
			
		||||
          // report design
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportDesign",
 | 
			
		||||
@@ -431,7 +431,7 @@ export default {
 | 
			
		||||
        case "sync": {
 | 
			
		||||
          let shouldShowOverlay = false;
 | 
			
		||||
          let payload = "";
 | 
			
		||||
          console.log("sync...", type, data);
 | 
			
		||||
          //console.log("sync...", type, data);
 | 
			
		||||
          if (typeof data === "object") {
 | 
			
		||||
            const head = data.head;
 | 
			
		||||
            const syncOpt =
 | 
			
		||||
@@ -469,7 +469,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -503,7 +503,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", params);
 | 
			
		||||
          //console.log("查询", params);
 | 
			
		||||
          this.getList(params);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -541,7 +541,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -165,10 +165,10 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    page: (val) => {
 | 
			
		||||
      console.log("page changed:", val);
 | 
			
		||||
      //console.log("page changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    size: (val) => {
 | 
			
		||||
      console.log("size changed:", val);
 | 
			
		||||
      //console.log("size changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    triggerUpdate(val, oldVal) {
 | 
			
		||||
      if (val && val !== oldVal) {
 | 
			
		||||
@@ -224,7 +224,7 @@ export default {
 | 
			
		||||
      });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    console.log("this.queryParams is: ", JSON.stringify(this.queryParams));
 | 
			
		||||
    //console.log("this.queryParams is: ", JSON.stringify(this.queryParams));
 | 
			
		||||
 | 
			
		||||
    this.initDataWhenLoad && this.getList();
 | 
			
		||||
  },
 | 
			
		||||
@@ -257,7 +257,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -307,7 +307,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -363,7 +363,7 @@ export default {
 | 
			
		||||
            .catch((err) => {});
 | 
			
		||||
        }
 | 
			
		||||
        case "edit": {
 | 
			
		||||
          console.log("[edit] ", data);
 | 
			
		||||
          //console.log("[edit] ", data);
 | 
			
		||||
          this.openDialog(data); /** data is ==> id */
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -395,7 +395,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "status": {
 | 
			
		||||
          console.log("status", data);
 | 
			
		||||
          //console.log("status", data);
 | 
			
		||||
          // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
          const { id, code } = data;
 | 
			
		||||
          const queryCondition = { id, code };
 | 
			
		||||
@@ -420,7 +420,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "view-attachment-justform-version": {
 | 
			
		||||
          console.log(data);
 | 
			
		||||
          //console.log(data);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "view-recipe": {
 | 
			
		||||
@@ -428,7 +428,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "to-bom-detail": {
 | 
			
		||||
          console.log("to-bom-detail", data);
 | 
			
		||||
          //console.log("to-bom-detail", data);
 | 
			
		||||
          // 查看配方详情
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-bomDetails",
 | 
			
		||||
@@ -447,7 +447,7 @@ export default {
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              //
 | 
			
		||||
              let payload = "";
 | 
			
		||||
              console.log("copying...", type, data);
 | 
			
		||||
              //console.log("copying...", type, data);
 | 
			
		||||
              if (typeof data === "object") {
 | 
			
		||||
                const head = data.head;
 | 
			
		||||
                const copyOpt =
 | 
			
		||||
@@ -517,7 +517,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "preview": {
 | 
			
		||||
          console.log("[PREVIEW] data", data);
 | 
			
		||||
          //console.log("[PREVIEW] data", data);
 | 
			
		||||
          // report preview
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportPreview",
 | 
			
		||||
@@ -527,7 +527,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "design": {
 | 
			
		||||
          console.log("[DESIGN] data", data);
 | 
			
		||||
          //console.log("[DESIGN] data", data);
 | 
			
		||||
          // report design
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportDesign",
 | 
			
		||||
@@ -594,7 +594,7 @@ export default {
 | 
			
		||||
          }).then(() => {
 | 
			
		||||
            let shouldShowOverlay = false;
 | 
			
		||||
            let payload = "";
 | 
			
		||||
            // console.log("sync...", type, data);
 | 
			
		||||
            // //console.log("sync...", type, data);
 | 
			
		||||
            if (typeof data === "object") {
 | 
			
		||||
              const head = data.head;
 | 
			
		||||
              const syncOpt =
 | 
			
		||||
@@ -638,9 +638,22 @@ export default {
 | 
			
		||||
            type: "warning",
 | 
			
		||||
          })
 | 
			
		||||
            .then(this.printOnce.bind(null, data))
 | 
			
		||||
            .catch((err) => {
 | 
			
		||||
              // console.log("cancel ", err);
 | 
			
		||||
            });
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              // send successful request
 | 
			
		||||
              return this.$http({
 | 
			
		||||
                url: "/pms/pallet/print",
 | 
			
		||||
                method: "post",
 | 
			
		||||
                data: data,
 | 
			
		||||
                headers: {
 | 
			
		||||
                  "Content-Type": "application/json",
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              this.$message.success("打印成功!");
 | 
			
		||||
              this.getList();
 | 
			
		||||
            })
 | 
			
		||||
            .catch(console.error);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
@@ -653,7 +666,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "批量同步":
 | 
			
		||||
          this.overlayVisible = true;
 | 
			
		||||
@@ -676,8 +689,8 @@ export default {
 | 
			
		||||
            data: { page: this.page },
 | 
			
		||||
            responseType: "blob",
 | 
			
		||||
          }).then((res) => {
 | 
			
		||||
            // console.log("导出", res);
 | 
			
		||||
            const filename = res.headers['content-disposition'].split('filename=')[1];
 | 
			
		||||
            // //console.log("导出", res);
 | 
			
		||||
            const filename = res.headers["content-disposition"].split("filename=")[1];
 | 
			
		||||
            const blob = new Blob([res.data]);
 | 
			
		||||
            /** 通知 */
 | 
			
		||||
            this.$notify({
 | 
			
		||||
@@ -720,7 +733,7 @@ export default {
 | 
			
		||||
            delete params.timerange;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          // console.log(
 | 
			
		||||
          // //console.log(
 | 
			
		||||
          //   "查询 params",
 | 
			
		||||
          //   JSON.stringify({
 | 
			
		||||
          //     // ...this.queryParams,
 | 
			
		||||
@@ -747,7 +760,7 @@ export default {
 | 
			
		||||
            this.$http
 | 
			
		||||
              .post(this.urls.syncUrl)
 | 
			
		||||
              .then(({ data: res }) => {
 | 
			
		||||
                console.log("同步", res);
 | 
			
		||||
                //console.log("同步", res);
 | 
			
		||||
                this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
 | 
			
		||||
                this.getList();
 | 
			
		||||
                this.overlayVisible = false;
 | 
			
		||||
@@ -770,20 +783,35 @@ export default {
 | 
			
		||||
            cancelButtonText: "我再想想",
 | 
			
		||||
            type: "warning",
 | 
			
		||||
          })
 | 
			
		||||
            .then(async () => {
 | 
			
		||||
              const batchPrint = async function* () {
 | 
			
		||||
                for (const { id } of this.tableSelectedIds) {
 | 
			
		||||
                  yield { id: id, result: await this.printOnce(id) };
 | 
			
		||||
                }
 | 
			
		||||
              };
 | 
			
		||||
 | 
			
		||||
              for await (const { id } of batchPrint.call(this)) {
 | 
			
		||||
                //console.log("打印中...", id);
 | 
			
		||||
                // send successful request
 | 
			
		||||
                await this.$http({
 | 
			
		||||
                  url: "/pms/pallet/print",
 | 
			
		||||
                  method: "post",
 | 
			
		||||
                  data: id,
 | 
			
		||||
                  headers: {
 | 
			
		||||
                    "Content-Type": "application/json",
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              console.log("打印如下这些 ids:", this.tableSelectedIds);
 | 
			
		||||
              // this.tableSelectedIds.reduce(async (id, _) => {
 | 
			
		||||
              //   await this.printOnce(id);
 | 
			
		||||
              // })
 | 
			
		||||
              this.tableSelectedIds.forEach(async (id) => {
 | 
			
		||||
                await this.printOnce(id);
 | 
			
		||||
              });
 | 
			
		||||
              this.$message.success("打印成功!");
 | 
			
		||||
              this.getList();
 | 
			
		||||
            })
 | 
			
		||||
            .catch((err) => {
 | 
			
		||||
              this.$message.error(`批量打印出错: ${err}`);
 | 
			
		||||
            });
 | 
			
		||||
        case "报工":
 | 
			
		||||
          console.log("报工ids:", this.tableSelectedIds);
 | 
			
		||||
          //console.log("报工ids:", this.tableSelectedIds);
 | 
			
		||||
          this.carReportDialogVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs["car-report-dialog"].init();
 | 
			
		||||
@@ -818,7 +846,7 @@ export default {
 | 
			
		||||
      return new Promise((resolve) => {
 | 
			
		||||
        this.printDOMmount = true;
 | 
			
		||||
        this.$nextTick(async () => {
 | 
			
		||||
          console.log("[Print] 打印项:", id);
 | 
			
		||||
          //console.log("[Print] 打印项:", id);
 | 
			
		||||
          await this.$refs["print"].print(id);
 | 
			
		||||
          resolve();
 | 
			
		||||
        });
 | 
			
		||||
@@ -849,7 +877,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ export default {
 | 
			
		||||
						}
 | 
			
		||||
						list.push(newRouteItem);
 | 
			
		||||
					} else {
 | 
			
		||||
						// console.log(menu.name, '是应该被隐藏的路由')
 | 
			
		||||
						// //console.log(menu.name, '是应该被隐藏的路由')
 | 
			
		||||
					}
 | 
			
		||||
				});
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
@@ -190,19 +190,19 @@ export default {
 | 
			
		||||
    const promiseHistory = {};
 | 
			
		||||
 | 
			
		||||
    const getData = (col, param) => {
 | 
			
		||||
      console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      //console.log("getData: ", col.prop, "/", param ?? "no param!");
 | 
			
		||||
      // 获取数据 - 不需要等待前置条件时
 | 
			
		||||
      promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
            console.log(
 | 
			
		||||
              "SdASD ",
 | 
			
		||||
              res.data.list.map((i) => ({
 | 
			
		||||
                label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
                value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
                [col.customLabel]: i[col.customLabel],
 | 
			
		||||
              }))
 | 
			
		||||
            );
 | 
			
		||||
            //console.log(
 | 
			
		||||
              // "SdASD ",
 | 
			
		||||
              // res.data.list.map((i) => ({
 | 
			
		||||
              //   label: col.optionLabel ? i[col.optionLabel] : i.name,
 | 
			
		||||
              //   value: col.optionValue ? i[col.optionValue] : i.id,
 | 
			
		||||
              //   [col.customLabel]: i[col.customLabel],
 | 
			
		||||
              // }))
 | 
			
		||||
            // );
 | 
			
		||||
            // 填充 options
 | 
			
		||||
            this.$set(
 | 
			
		||||
              col,
 | 
			
		||||
@@ -226,13 +226,13 @@ export default {
 | 
			
		||||
 | 
			
		||||
            // 设置监听
 | 
			
		||||
            if ("injectTo" in col) {
 | 
			
		||||
              console.log("set watcher: ", col.prop);
 | 
			
		||||
              //console.log("set watcher: ", col.prop);
 | 
			
		||||
 | 
			
		||||
              const valueProp = "optionValue" in col ? col.optionValue : "id";
 | 
			
		||||
              const unwatch = this.$watch(
 | 
			
		||||
                () => this.dataForm[col.prop],
 | 
			
		||||
                (val) => {
 | 
			
		||||
                  console.log("do watcher: ", col.prop);
 | 
			
		||||
                  //console.log("do watcher: ", col.prop);
 | 
			
		||||
                  if (col.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
                  if (!val) {
 | 
			
		||||
                    col.injectTo.map((item) => {
 | 
			
		||||
@@ -248,7 +248,7 @@ export default {
 | 
			
		||||
                      this.$forceUpdate();
 | 
			
		||||
                    });
 | 
			
		||||
                  } else {
 | 
			
		||||
                    console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                    //console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                  }
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
@@ -287,14 +287,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
            // 设置监听
 | 
			
		||||
            if ("injectTo" in col && !col.watcher) {
 | 
			
		||||
              console.log("set watcher: ", col.prop);
 | 
			
		||||
              //console.log("set watcher: ", col.prop);
 | 
			
		||||
 | 
			
		||||
              const valueProp = "optionValue" in col ? col.optionValue : "id";
 | 
			
		||||
              const unwatch = this.$watch(
 | 
			
		||||
                () => this.dataForm[col.prop],
 | 
			
		||||
                (val) => {
 | 
			
		||||
                  if (col.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
                  console.log("do watcher: ", col.prop);
 | 
			
		||||
                  //console.log("do watcher: ", col.prop);
 | 
			
		||||
                  if (!val) {
 | 
			
		||||
                    col.injectTo.map((item) => {
 | 
			
		||||
                      this.$set(this.dataForm, item[0], null);
 | 
			
		||||
@@ -309,7 +309,7 @@ export default {
 | 
			
		||||
                      this.$forceUpdate();
 | 
			
		||||
                    });
 | 
			
		||||
                  } else {
 | 
			
		||||
                    console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                    //console.log('[x] if ("injectTo" in col) {');
 | 
			
		||||
                  }
 | 
			
		||||
                },
 | 
			
		||||
                {
 | 
			
		||||
@@ -330,16 +330,16 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      console.log("after getData: ", promiseHistory);
 | 
			
		||||
      //console.log("after getData: ", promiseHistory);
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    /** 处理函数 */
 | 
			
		||||
    const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
 | 
			
		||||
      console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
 | 
			
		||||
      //console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
 | 
			
		||||
      /** 此时 cachedList 已经确保可用了 */
 | 
			
		||||
      const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
 | 
			
		||||
      const param = target ? target[targetField] : "";
 | 
			
		||||
      console.log("((( chosenObject )))", target);
 | 
			
		||||
      //console.log("((( chosenObject )))", target);
 | 
			
		||||
 | 
			
		||||
      getData(col, param);
 | 
			
		||||
    };
 | 
			
		||||
@@ -358,13 +358,13 @@ export default {
 | 
			
		||||
      row.forEach((col) => {
 | 
			
		||||
        if (col == null) return;
 | 
			
		||||
        if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
 | 
			
		||||
          console.log("[hasPrev] set watcher: ", col.hasPrev);
 | 
			
		||||
          //console.log("[hasPrev] set watcher: ", col.hasPrev);
 | 
			
		||||
 | 
			
		||||
          // 获取数据 - 需要等待前置条件时
 | 
			
		||||
          const unwatch = this.$watch(
 | 
			
		||||
            () => this.dataForm[col.hasPrev],
 | 
			
		||||
            (val) => {
 | 
			
		||||
              console.log("[hasPrev] do watcher: ", col.hasPrev);
 | 
			
		||||
              //console.log("[hasPrev] do watcher: ", col.hasPrev);
 | 
			
		||||
              if (!val) {
 | 
			
		||||
                col.injectTo.map((item) => {
 | 
			
		||||
                  this.$set(this.dataForm, item[0], null);
 | 
			
		||||
@@ -398,11 +398,11 @@ export default {
 | 
			
		||||
    if (this.configs.extraFields)
 | 
			
		||||
      this.configs.extraFields.forEach((cnf) => {
 | 
			
		||||
        if (cnf.listenTo) {
 | 
			
		||||
          console.log("set watcher for: ", cnf.prop);
 | 
			
		||||
          //console.log("set watcher for: ", cnf.prop);
 | 
			
		||||
          const unwatch = this.$watch(
 | 
			
		||||
            () => this.dataForm[cnf.listenTo.prop],
 | 
			
		||||
            (carId) => {
 | 
			
		||||
              console.log("do watcher for: ", cnf.prop);
 | 
			
		||||
              //console.log("do watcher for: ", cnf.prop);
 | 
			
		||||
              if (!carId) return;
 | 
			
		||||
              if (cnf.disableWatcherOnEdit && this.editMode) return;
 | 
			
		||||
              cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
 | 
			
		||||
@@ -439,14 +439,14 @@ export default {
 | 
			
		||||
 | 
			
		||||
    resetSpecificFields(fields) {
 | 
			
		||||
      Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
        // console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
 | 
			
		||||
        // //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
 | 
			
		||||
        if (fields.indexOf(key) !== -1) {
 | 
			
		||||
          // console.log(`key ${key} in fields`)
 | 
			
		||||
          // //console.log(`key ${key} in fields`)
 | 
			
		||||
          // this.dataForm[key] = null;
 | 
			
		||||
          this.$set(this.dataForm, key, null);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      console.log("this.dataform", this.dataForm);
 | 
			
		||||
      //console.log("this.dataform", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    resetForm(excludeId = false, immediate = false) {
 | 
			
		||||
@@ -468,9 +468,9 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** init **/
 | 
			
		||||
    init(id, detailMode, tagInfo, extraParams) {
 | 
			
		||||
      // console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      // //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      if (this.$refs.dataForm) {
 | 
			
		||||
        // console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // //console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // 当不是首次渲染dialog的时候,一开始就清空验证信息,本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
 | 
			
		||||
        this.$refs.dataForm.clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
@@ -481,7 +481,7 @@ export default {
 | 
			
		||||
      /** 判断 extraParams */
 | 
			
		||||
      if (extraParams && typeof extraParams === "object") {
 | 
			
		||||
        for (const [key, value] of Object.entries(extraParams)) {
 | 
			
		||||
          // console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
 | 
			
		||||
          // //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
 | 
			
		||||
          this.$set(this.dataForm, key, value);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -514,7 +514,7 @@ export default {
 | 
			
		||||
                    url: file.fileUrl,
 | 
			
		||||
                  }));
 | 
			
		||||
                }
 | 
			
		||||
                // console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
                // //console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: `${res.code}: ${res.msg}`,
 | 
			
		||||
@@ -540,7 +540,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleButtonClick(col) {
 | 
			
		||||
      if (!("onClick" in col)) {
 | 
			
		||||
        console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
 | 
			
		||||
        //console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -551,7 +551,7 @@ export default {
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      if ("autoUpdateProp" in col) {
 | 
			
		||||
        // 自动更新 相关联 的字段
 | 
			
		||||
        // console.log(col.options, eventValue, this.savedDatalist);
 | 
			
		||||
        // //console.log(col.options, eventValue, this.savedDatalist);
 | 
			
		||||
        const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
 | 
			
		||||
        this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
 | 
			
		||||
      }
 | 
			
		||||
@@ -559,17 +559,17 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    addOrUpdate(method = "POST", url) {
 | 
			
		||||
      if ("parentId" in this.dataForm) {
 | 
			
		||||
        console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        // 对特殊的键做特殊处理,如 parentId 是一个 cascader,获取的值是 ["xxx"],后端只需要xxx
 | 
			
		||||
        const lastItem = this.dataForm.parentId.length - 1;
 | 
			
		||||
        this.dataForm.parentId = this.dataForm.parentId[lastItem];
 | 
			
		||||
@@ -621,7 +621,7 @@ export default {
 | 
			
		||||
            data: httpPayload,
 | 
			
		||||
          })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              console.log("[add&update] res is: ", res);
 | 
			
		||||
              //console.log("[add&update] res is: ", res);
 | 
			
		||||
              this.loadingStatus = false;
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$message.success(method === "POST" ? "添加成功" : "更新成功");
 | 
			
		||||
@@ -647,7 +647,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -659,7 +659,7 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
          case "resetSpecific":
 | 
			
		||||
            // qualityInspectionRecord config 里引用
 | 
			
		||||
            console.log("resetFields", this.resetFields);
 | 
			
		||||
            //console.log("resetFields", this.resetFields);
 | 
			
		||||
            this.resetSpecificFields(this.resetFields);
 | 
			
		||||
            break;
 | 
			
		||||
          case "add":
 | 
			
		||||
@@ -674,18 +674,18 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
          }
 | 
			
		||||
          case "add-car-payload": {
 | 
			
		||||
            console.log("edit-car-payload", payload);
 | 
			
		||||
            //console.log("edit-car-payload", payload);
 | 
			
		||||
            this.addOrUpdate("POST", this.urls.payloadFormUrl);
 | 
			
		||||
            break;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -95,7 +95,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    blenderOrderId() {
 | 
			
		||||
      const item = this.listQueryExtra.find((item) => item.blenderOrderId);
 | 
			
		||||
      console.log("Find blenderOrderId", item);
 | 
			
		||||
      //console.log("Find blenderOrderId", item);
 | 
			
		||||
      return item ? item.blenderOrderId : null;
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
@@ -104,10 +104,10 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    page: (val) => {
 | 
			
		||||
      console.log("page changed:", val);
 | 
			
		||||
      //console.log("page changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    size: (val) => {
 | 
			
		||||
      console.log("size changed:", val);
 | 
			
		||||
      //console.log("size changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    triggerUpdate(val, oldVal) {
 | 
			
		||||
      if (val && val !== oldVal) {
 | 
			
		||||
@@ -191,7 +191,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -240,7 +240,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -381,7 +381,7 @@ export default {
 | 
			
		||||
            this.$http
 | 
			
		||||
              .post(this.urls.syncUrl)
 | 
			
		||||
              .then(({ data: res }) => {
 | 
			
		||||
                console.log("同步", res);
 | 
			
		||||
                //console.log("同步", res);
 | 
			
		||||
                this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
 | 
			
		||||
                this.getList();
 | 
			
		||||
                this.overlayVisible = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -100,7 +100,7 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    blenderOrderId: {
 | 
			
		||||
      handler(val) {
 | 
			
		||||
        // console.log("blenderOrderId changed", val);
 | 
			
		||||
        // //console.log("blenderOrderId changed", val);
 | 
			
		||||
      },
 | 
			
		||||
      immediate: true,
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -23,11 +23,11 @@ export default {
 | 
			
		||||
  computed: {
 | 
			
		||||
    // 混料订单id
 | 
			
		||||
    id() {
 | 
			
		||||
      console.log("computed id", this.$route.query.id || "");
 | 
			
		||||
      //console.log("computed id", this.$route.query.id || "");
 | 
			
		||||
      return this.$route.query.id || "";
 | 
			
		||||
    },
 | 
			
		||||
    refreshPage() {
 | 
			
		||||
      console.log("computed refreshPage");
 | 
			
		||||
      //console.log("computed refreshPage");
 | 
			
		||||
      const val = this.$route.query.refreshPage ? Math.random().toString() : null;
 | 
			
		||||
      // 手动清除 location.href 里的 refreshPage
 | 
			
		||||
      location.href = location.href.replace(/&refreshPage=[^&]*/, "");
 | 
			
		||||
@@ -50,7 +50,7 @@ export default {
 | 
			
		||||
  //     handler: function (route) {
 | 
			
		||||
  //       if (route.query.id) {
 | 
			
		||||
  //         this.triggerUpdateKey = Math.random().toString()
 | 
			
		||||
  //         console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
 | 
			
		||||
  //         //console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
 | 
			
		||||
  //       }
 | 
			
		||||
  //     },
 | 
			
		||||
  //     immediate: true,
 | 
			
		||||
@@ -60,7 +60,7 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    refreshPage: {
 | 
			
		||||
      handler: function (val) {
 | 
			
		||||
        console.log("refreshPage", val);
 | 
			
		||||
        //console.log("refreshPage", val);
 | 
			
		||||
        if (val) {
 | 
			
		||||
          // this.triggerUpdateKey = Math.random().toString();
 | 
			
		||||
          this.triggerUpdateKey = val;
 | 
			
		||||
 
 | 
			
		||||
@@ -135,7 +135,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -176,7 +176,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data, toRouter }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -283,7 +283,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -320,7 +320,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ export default {
 | 
			
		||||
          if (col.delayRequest) delayList.push(col);
 | 
			
		||||
          // let doRequest = null;
 | 
			
		||||
          // if (col.fetchData.length) {
 | 
			
		||||
          //   console.log(`this.bomCode '${this.bomCode}'`);
 | 
			
		||||
          //   //console.log(`this.bomCode '${this.bomCode}'`);
 | 
			
		||||
          //   // 如果有参数
 | 
			
		||||
          //   doRequest = col.fetchData.bind(this.bomCode);
 | 
			
		||||
          // } else doRequest = col.fetchData;
 | 
			
		||||
@@ -146,7 +146,7 @@ export default {
 | 
			
		||||
                    }))
 | 
			
		||||
                  );
 | 
			
		||||
                } else {
 | 
			
		||||
                  console.log("请检查返回的数据类型");
 | 
			
		||||
                  //console.log("请检查返回的数据类型");
 | 
			
		||||
                }
 | 
			
		||||
              } else {
 | 
			
		||||
                col.options.splice(0);
 | 
			
		||||
@@ -207,7 +207,7 @@ export default {
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            this.dataForm[key] = null;
 | 
			
		||||
          });
 | 
			
		||||
          console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          //console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          this.$refs.dataForm.clearValidate();
 | 
			
		||||
          this.$emit("dialog-closed"); // 触发父组件销毁自己
 | 
			
		||||
        },
 | 
			
		||||
@@ -220,17 +220,17 @@ export default {
 | 
			
		||||
      // id 和 混料机 ID 混料订单号 和 配方id
 | 
			
		||||
      const { id, code, blender, bomId } = row;
 | 
			
		||||
 | 
			
		||||
      // console.log(" { id, code, blender } = row;", row);
 | 
			
		||||
      // //console.log(" { id, code, blender } = row;", row);
 | 
			
		||||
 | 
			
		||||
      if (this.$refs.dataForm) {
 | 
			
		||||
        this.$refs.dataForm.clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      this.delayList.forEach((col) => {
 | 
			
		||||
        // console.log("delay fetch", col);
 | 
			
		||||
        // //console.log("delay fetch", col);
 | 
			
		||||
        // 需要延迟获取异步数据的 col 配置
 | 
			
		||||
        if (col.fetchDataParam in row) {
 | 
			
		||||
          // console.log("delay row ", row, row[col.fetchDataParam]);
 | 
			
		||||
          // //console.log("delay row ", row, row[col.fetchDataParam]);
 | 
			
		||||
          col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
 | 
			
		||||
            if (res.code === 0) {
 | 
			
		||||
              if ("list" in res.data) {
 | 
			
		||||
@@ -252,7 +252,7 @@ export default {
 | 
			
		||||
                  }))
 | 
			
		||||
                );
 | 
			
		||||
              } else {
 | 
			
		||||
                console.log("请检查返回的数据类型");
 | 
			
		||||
                //console.log("请检查返回的数据类型");
 | 
			
		||||
              }
 | 
			
		||||
            } else {
 | 
			
		||||
              col.options.splice(0);
 | 
			
		||||
@@ -274,17 +274,17 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** handlers */
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      // console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      // //console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      this.$forceUpdate();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      // console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      // //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      // console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      // //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    addOrUpdate(method = "POST") {
 | 
			
		||||
@@ -321,7 +321,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -333,12 +333,12 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -170,7 +170,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -209,7 +209,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleOperatePress({ type, data, toRouter }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "detach": {
 | 
			
		||||
          // 下发订单
 | 
			
		||||
@@ -249,7 +249,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data, toRouter }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -355,7 +355,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -392,7 +392,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition, "press");
 | 
			
		||||
          break;
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ export default {
 | 
			
		||||
          if (col.delayRequest) delayList.push(col);
 | 
			
		||||
          // let doRequest = null;
 | 
			
		||||
          // if (col.fetchData.length) {
 | 
			
		||||
          //   console.log(`this.bomCode '${this.bomCode}'`);
 | 
			
		||||
          //   //console.log(`this.bomCode '${this.bomCode}'`);
 | 
			
		||||
          //   // 如果有参数
 | 
			
		||||
          //   doRequest = col.fetchData.bind(this.bomCode);
 | 
			
		||||
          // } else doRequest = col.fetchData;
 | 
			
		||||
@@ -146,7 +146,7 @@ export default {
 | 
			
		||||
                    }))
 | 
			
		||||
                  );
 | 
			
		||||
                } else {
 | 
			
		||||
                  console.log("请检查返回的数据类型");
 | 
			
		||||
                  //console.log("请检查返回的数据类型");
 | 
			
		||||
                }
 | 
			
		||||
              } else {
 | 
			
		||||
                col.options.splice(0);
 | 
			
		||||
@@ -207,7 +207,7 @@ export default {
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            this.dataForm[key] = null;
 | 
			
		||||
          });
 | 
			
		||||
          console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          //console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          this.$refs.dataForm.clearValidate();
 | 
			
		||||
          this.$emit("dialog-closed"); // 触发父组件销毁自己
 | 
			
		||||
        },
 | 
			
		||||
@@ -220,17 +220,17 @@ export default {
 | 
			
		||||
      // id 和 混料机 ID 混料订单号 和 配方id
 | 
			
		||||
      const { id, code, blender, bomId } = row;
 | 
			
		||||
 | 
			
		||||
      // console.log(" { id, code, blender } = row;", row);
 | 
			
		||||
      // //console.log(" { id, code, blender } = row;", row);
 | 
			
		||||
 | 
			
		||||
      if (this.$refs.dataForm) {
 | 
			
		||||
        this.$refs.dataForm.clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      this.delayList.forEach((col) => {
 | 
			
		||||
        // console.log("delay fetch", col);
 | 
			
		||||
        // //console.log("delay fetch", col);
 | 
			
		||||
        // 需要延迟获取异步数据的 col 配置
 | 
			
		||||
        if (col.fetchDataParam in row) {
 | 
			
		||||
          // console.log("delay row ", row, row[col.fetchDataParam]);
 | 
			
		||||
          // //console.log("delay row ", row, row[col.fetchDataParam]);
 | 
			
		||||
          col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
 | 
			
		||||
            if (res.code === 0) {
 | 
			
		||||
              if ("list" in res.data) {
 | 
			
		||||
@@ -252,7 +252,7 @@ export default {
 | 
			
		||||
                  }))
 | 
			
		||||
                );
 | 
			
		||||
              } else {
 | 
			
		||||
                console.log("请检查返回的数据类型");
 | 
			
		||||
                //console.log("请检查返回的数据类型");
 | 
			
		||||
              }
 | 
			
		||||
            } else {
 | 
			
		||||
              col.options.splice(0);
 | 
			
		||||
@@ -274,17 +274,17 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** handlers */
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      // console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      // //console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      this.$forceUpdate();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    addOrUpdate(method = "POST") {
 | 
			
		||||
@@ -321,7 +321,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -333,12 +333,12 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ const syncTimeComponent = {
 | 
			
		||||
    return {}
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log('syncTimeComponent mounted', this.injectData)
 | 
			
		||||
    //console.log('syncTimeComponent mounted', this.injectData)
 | 
			
		||||
  },
 | 
			
		||||
  render: function (h) {
 | 
			
		||||
    return h('div', {
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ export default {
 | 
			
		||||
      handler: function (route) {
 | 
			
		||||
        if (route.query.code) {
 | 
			
		||||
          this.triggerUpdateKey = Math.random().toString();
 | 
			
		||||
          console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
 | 
			
		||||
          //console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      immediate: true,
 | 
			
		||||
 
 | 
			
		||||
@@ -155,12 +155,12 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    async getTechDetailInfo() {
 | 
			
		||||
      console.log("[getTechDetailInfo] this.techId: ", this.techId);
 | 
			
		||||
      //console.log("[getTechDetailInfo] this.techId: ", this.techId);
 | 
			
		||||
      // 填充 dataForm
 | 
			
		||||
      try {
 | 
			
		||||
        const { data: res } = await this.$http.get(`/pms/equipmentTech/${this.techId}`);
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          // console.log('[getTechDetailInfo] res.data: ', res.data)
 | 
			
		||||
          // //console.log('[getTechDetailInfo] res.data: ', res.data)
 | 
			
		||||
          // return;
 | 
			
		||||
          this.$set(this.dataForm, "code", res.data.code);
 | 
			
		||||
          this.$set(this.dataForm, "remark", res.data.remark);
 | 
			
		||||
@@ -179,7 +179,7 @@ export default {
 | 
			
		||||
      try {
 | 
			
		||||
        const { data: res } = await this.$http.get("/pms/equipmentTechParam/page", { params });
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          console.log("[getTechDetailList] res.data: ", res.data);
 | 
			
		||||
          //console.log("[getTechDetailList] res.data: ", res.data);
 | 
			
		||||
          this.dataList = res.data.list;
 | 
			
		||||
          this.total = res.data.total;
 | 
			
		||||
        }
 | 
			
		||||
@@ -189,7 +189,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleTabClick(v) {
 | 
			
		||||
      //   console.log("handleTabClick: ", v);
 | 
			
		||||
      //   //console.log("handleTabClick: ", v);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleOperate() {},
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@ export default {
 | 
			
		||||
        page: 1,
 | 
			
		||||
      });
 | 
			
		||||
      if (res.code == 0) {
 | 
			
		||||
        console.log("res", res);
 | 
			
		||||
        //console.log("res", res);
 | 
			
		||||
        this.techList = res.data.list.map((item) => {
 | 
			
		||||
          return {
 | 
			
		||||
            label: item.code,
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ export default {
 | 
			
		||||
          params,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            if ("list" in res.data) {
 | 
			
		||||
@@ -127,7 +127,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "查询":
 | 
			
		||||
          this.getList({ ...payload });
 | 
			
		||||
@@ -136,7 +136,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleDestroy(type, refresh) {
 | 
			
		||||
      console.log("[handleDestroy] ", type);
 | 
			
		||||
      //console.log("[handleDestroy] ", type);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "edit":
 | 
			
		||||
          this.editVisible = false;
 | 
			
		||||
@@ -151,7 +151,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "delete": {
 | 
			
		||||
          // 找到删除的 prompt 字段
 | 
			
		||||
@@ -197,7 +197,7 @@ export default {
 | 
			
		||||
            .catch((err) => {});
 | 
			
		||||
        }
 | 
			
		||||
        case "edit": {
 | 
			
		||||
          console.log("[edit] ", data);
 | 
			
		||||
          //console.log("[edit] ", data);
 | 
			
		||||
          this.editVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.edit.init({
 | 
			
		||||
@@ -211,7 +211,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "view-detail-action": {
 | 
			
		||||
          console.log("[detail] ", data, data.techId);
 | 
			
		||||
          //console.log("[detail] ", data, data.techId);
 | 
			
		||||
          if (!data || !data.techId) {
 | 
			
		||||
            this.$message.warning("暂无详请可供查看");
 | 
			
		||||
            return;
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    //console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
@@ -181,7 +181,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -231,7 +231,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -304,7 +304,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "status": {
 | 
			
		||||
          console.log("status", data);
 | 
			
		||||
          //console.log("status", data);
 | 
			
		||||
          // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
          const { id, code } = data;
 | 
			
		||||
          const queryCondition = { id, code };
 | 
			
		||||
@@ -333,7 +333,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "to-bom-detail": {
 | 
			
		||||
          // console.log('to-bom-detail', data.name)
 | 
			
		||||
          // //console.log('to-bom-detail', data.name)
 | 
			
		||||
          // 查看配方详情
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-bomDetails",
 | 
			
		||||
@@ -394,7 +394,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "preview": {
 | 
			
		||||
          console.log("[PREVIEW] data", data);
 | 
			
		||||
          //console.log("[PREVIEW] data", data);
 | 
			
		||||
          // report preview
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportPreview",
 | 
			
		||||
@@ -404,7 +404,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
        }
 | 
			
		||||
        case "design": {
 | 
			
		||||
          console.log("[DESIGN] data", data);
 | 
			
		||||
          //console.log("[DESIGN] data", data);
 | 
			
		||||
          // report design
 | 
			
		||||
          return this.$router.push({
 | 
			
		||||
            name: "pms-reportDesign",
 | 
			
		||||
@@ -470,7 +470,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -512,7 +512,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -551,7 +551,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ export default {
 | 
			
		||||
          hisId: this.hisId,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("temp dialog res", res);
 | 
			
		||||
          //console.log("temp dialog res", res);
 | 
			
		||||
          this.tableLoading = false;
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            if ("list" in res.data) {
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@ export default {
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("activated", this.$route.query)
 | 
			
		||||
    //console.log("activated", this.$route.query)
 | 
			
		||||
    this.code = this.$route.query.code || "";
 | 
			
		||||
    this.triggerUpdateKey = Math.random().toString();
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,7 @@ export default function () {
 | 
			
		||||
        { width: 56, type: "index", label: "序号" },
 | 
			
		||||
        { prop: "orderCode", label: "订单号" },
 | 
			
		||||
        { width: 80, prop: "orderCate", label: "订单子号" },
 | 
			
		||||
        { prop: "bomCode", label: "配方" },
 | 
			
		||||
        { prop: "brand", label: "配方" },
 | 
			
		||||
        { prop: "shapeCode", label: "砖型" },
 | 
			
		||||
        { width: 80, prop: "qty", label: "订单数量" },
 | 
			
		||||
        { width: 72, prop: "goodqty", label: "合格数" },
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    //console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
@@ -182,7 +182,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -221,7 +221,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -291,7 +291,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "status": {
 | 
			
		||||
        //   console.log("status", data);
 | 
			
		||||
        //   //console.log("status", data);
 | 
			
		||||
        //   // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
        //   const { id, code } = data;
 | 
			
		||||
        //   const queryCondition = { id, code };
 | 
			
		||||
@@ -320,7 +320,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "to-bom-detail": {
 | 
			
		||||
        //   // console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // //console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // 查看配方详情
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-bomDetails",
 | 
			
		||||
@@ -381,7 +381,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "preview": {
 | 
			
		||||
        //   console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   //console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   // report preview
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportPreview",
 | 
			
		||||
@@ -391,7 +391,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "design": {
 | 
			
		||||
        //   console.log("[DESIGN] data", data);
 | 
			
		||||
        //   //console.log("[DESIGN] data", data);
 | 
			
		||||
        //   // report design
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportDesign",
 | 
			
		||||
@@ -457,7 +457,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -500,7 +500,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -539,7 +539,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleTabClick(tab) {
 | 
			
		||||
      console.log("handle tab click", tab);
 | 
			
		||||
      //console.log("handle tab click", tab);
 | 
			
		||||
      if (tab > this.oldActiveTab) this.toLeft = true;
 | 
			
		||||
      else this.toLeft = false;
 | 
			
		||||
      switch (tab) {
 | 
			
		||||
@@ -89,7 +89,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** init **/
 | 
			
		||||
    init(order, detailMode) {
 | 
			
		||||
      console.log("init menu dialog,", order);
 | 
			
		||||
      //console.log("init menu dialog,", order);
 | 
			
		||||
      this.order = order;
 | 
			
		||||
      this.detailMode = detailMode ?? false;
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -260,7 +260,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -300,14 +300,14 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "同步":
 | 
			
		||||
        case "全部同步":
 | 
			
		||||
          this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
 | 
			
		||||
            console.log("全部同步", res);
 | 
			
		||||
            //console.log("全部同步", res);
 | 
			
		||||
            if (res.code === 0) {
 | 
			
		||||
              this.$message({ message: "同步成功", type: "success" });
 | 
			
		||||
              this.getList();
 | 
			
		||||
@@ -334,7 +334,7 @@ export default {
 | 
			
		||||
    openDialog(row, detail) {
 | 
			
		||||
      this.dialogVisible = true;
 | 
			
		||||
 | 
			
		||||
      console.log("row detail", row, detail);
 | 
			
		||||
      //console.log("row detail", row, detail);
 | 
			
		||||
 | 
			
		||||
      let extraParams = null;
 | 
			
		||||
      if (this.attachListQueryExtra && this.listQueryExtra.length) {
 | 
			
		||||
@@ -344,7 +344,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row, detail);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSizeChange(newSize) {
 | 
			
		||||
@@ -89,7 +89,7 @@ export default {
 | 
			
		||||
        ...this.extraQueryFields,
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      console.log("getAlist", data, this.pageIsPost);
 | 
			
		||||
      //console.log("getAlist", data, this.pageIsPost);
 | 
			
		||||
 | 
			
		||||
      return this.$http({
 | 
			
		||||
        url: this.urls.page ?? this.urls.base + "/page",
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ export default {
 | 
			
		||||
    orderId: {
 | 
			
		||||
      handler: function (val) {
 | 
			
		||||
        if (val) {
 | 
			
		||||
          console.log("get car list based on orderId: ", val);
 | 
			
		||||
          //console.log("get car list based on orderId: ", val);
 | 
			
		||||
          this.getAList(val);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
@@ -125,7 +125,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  // activated() {
 | 
			
		||||
  //   console.log("hhh");
 | 
			
		||||
  //   //console.log("hhh");
 | 
			
		||||
  //   this.refreshLayoutKey = Math.random();
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -218,7 +218,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getAList(orderId) {
 | 
			
		||||
      console.log("geting car list, ", orderId);
 | 
			
		||||
      //console.log("geting car list, ", orderId);
 | 
			
		||||
      if (!orderId) orderId = this.orderId;
 | 
			
		||||
 | 
			
		||||
      this.tableLoading = true;
 | 
			
		||||
@@ -227,7 +227,7 @@ export default {
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
            this.dataList = res.data.list;
 | 
			
		||||
            this.totalPage = res.data.total;
 | 
			
		||||
          } else console.log("没有res.data.list属性");
 | 
			
		||||
          }  
 | 
			
		||||
        } else {
 | 
			
		||||
          this.dataList.splice(0);
 | 
			
		||||
          this.totalPage = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  created() { },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log('this.order', this.order)
 | 
			
		||||
    //console.log('this.order', this.order)
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ export default {
 | 
			
		||||
          hisId: this.hisId,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("temp dialog res", res);
 | 
			
		||||
          //console.log("temp dialog res", res);
 | 
			
		||||
          this.tableLoading = false;
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            if ("list" in res.data) {
 | 
			
		||||
 
 | 
			
		||||
@@ -110,7 +110,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    //console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
@@ -179,7 +179,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -218,7 +218,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -287,7 +287,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "status": {
 | 
			
		||||
        //   console.log("status", data);
 | 
			
		||||
        //   //console.log("status", data);
 | 
			
		||||
        //   // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
        //   const { id, code } = data;
 | 
			
		||||
        //   const queryCondition = { id, code };
 | 
			
		||||
@@ -316,7 +316,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "to-bom-detail": {
 | 
			
		||||
        //   // console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // //console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // 查看配方详情
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-bomDetails",
 | 
			
		||||
@@ -377,7 +377,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "preview": {
 | 
			
		||||
        //   console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   //console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   // report preview
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportPreview",
 | 
			
		||||
@@ -387,7 +387,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "design": {
 | 
			
		||||
        //   console.log("[DESIGN] data", data);
 | 
			
		||||
        //   //console.log("[DESIGN] data", data);
 | 
			
		||||
        //   // report design
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportDesign",
 | 
			
		||||
@@ -453,7 +453,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -495,7 +495,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -534,7 +534,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -127,7 +127,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleSubEmitData(payload) {
 | 
			
		||||
      console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      //console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      this.$emit("operate-event", payload);
 | 
			
		||||
    },
 | 
			
		||||
    loadSubClassFn(tree, treeNode, resolve) {
 | 
			
		||||
 
 | 
			
		||||
@@ -155,12 +155,12 @@ export default {
 | 
			
		||||
    resetForm(excludeId = false, immediate = false) {
 | 
			
		||||
      setTimeout(
 | 
			
		||||
        () => {
 | 
			
		||||
          console.log("[Dialog Just Form] clearing form...");
 | 
			
		||||
          //console.log("[Dialog Just Form] clearing form...");
 | 
			
		||||
          Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            this.dataForm[key] = null;
 | 
			
		||||
          });
 | 
			
		||||
          console.log("[Dialog Just Form] cleared form...", this.dataForm);
 | 
			
		||||
          //console.log("[Dialog Just Form] cleared form...", this.dataForm);
 | 
			
		||||
          this.$refs.dataForm.clearValidate();
 | 
			
		||||
          this.$emit("dialog-closed"); // 触发父组件销毁自己
 | 
			
		||||
        },
 | 
			
		||||
@@ -182,11 +182,11 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -209,7 +209,7 @@ export default {
 | 
			
		||||
                  data: this.dataForm,
 | 
			
		||||
                })
 | 
			
		||||
                  .then(({ data: res }) => {
 | 
			
		||||
                    console.log("[add&update] res is: ", res);
 | 
			
		||||
                    //console.log("[add&update] res is: ", res);
 | 
			
		||||
                    this.loadingStatus = false;
 | 
			
		||||
                    if (res.code === 0) {
 | 
			
		||||
                      this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
 | 
			
		||||
 
 | 
			
		||||
@@ -201,7 +201,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleLoadSub({ tree, treeNode, resolve }) {
 | 
			
		||||
      // console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
 | 
			
		||||
      // //console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
 | 
			
		||||
      this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
 | 
			
		||||
        if (res.code === 0 && res.data) {
 | 
			
		||||
          resolve(
 | 
			
		||||
@@ -246,7 +246,7 @@ export default {
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          // page 场景:
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
@@ -267,7 +267,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -307,7 +307,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "status": {
 | 
			
		||||
          console.log("status", data);
 | 
			
		||||
          //console.log("status", data);
 | 
			
		||||
          // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
          const { id, code } = data;
 | 
			
		||||
          const queryCondition = { id, code };
 | 
			
		||||
@@ -346,7 +346,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ export default {
 | 
			
		||||
      deep: true,
 | 
			
		||||
    },
 | 
			
		||||
    "dataForm.description": function (val) {
 | 
			
		||||
      console.log("here", val);
 | 
			
		||||
      //console.log("here", val);
 | 
			
		||||
      if (val === "batch备用服务器") {
 | 
			
		||||
        this.loadData(0);
 | 
			
		||||
      } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -129,7 +129,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleSubEmitData(payload) {
 | 
			
		||||
      // console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      // //console.log("[component] BaseListTable handleSubEmitData(): ", payload);
 | 
			
		||||
      this.$emit("operate-event", payload);
 | 
			
		||||
    },
 | 
			
		||||
    loadSubClassFn(tree, treeNode, resolve) {
 | 
			
		||||
 
 | 
			
		||||
@@ -126,7 +126,7 @@ export default {
 | 
			
		||||
      // TODO: 此处也需要修改,碰到具体业务需求才更新...
 | 
			
		||||
      if (field.watch) {
 | 
			
		||||
        // const { index: innerIdx, condition } = field.watch;
 | 
			
		||||
        // console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
 | 
			
		||||
        // //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
 | 
			
		||||
        // // 设置监听器
 | 
			
		||||
        // this.$watch(
 | 
			
		||||
        //   () => this.searchForm[innerIdx],
 | 
			
		||||
@@ -136,19 +136,19 @@ export default {
 | 
			
		||||
        //     // 	queryParams
 | 
			
		||||
        //     // })
 | 
			
		||||
        //     this.$http(field.url, queryParams).then((res) => {
 | 
			
		||||
        //       console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
 | 
			
		||||
        //       //console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
 | 
			
		||||
        //       // 此处是外部的 index
 | 
			
		||||
        //       this.searchForm[index] = Math.floor(Math.random() * 10);
 | 
			
		||||
        //     });
 | 
			
		||||
        //   }
 | 
			
		||||
        // );
 | 
			
		||||
        // console.log("[BaseSearchForm] mounted(): ", this.searchForm);
 | 
			
		||||
        // //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
 | 
			
		||||
        // // 如果此时已经有默认值了,就立马根据这个默认值来发起请求
 | 
			
		||||
        // if (this.searchForm[innerIdx]) {
 | 
			
		||||
        //   // TODO: 这个判断好像不太需要...
 | 
			
		||||
        //   console.log("TODO: 这个判断好像不太需要...");
 | 
			
		||||
        //   //console.log("TODO: 这个判断好像不太需要...");
 | 
			
		||||
        // } else {
 | 
			
		||||
        //   console.log("TODO: 监听的字段还没来得及设置值呢...");
 | 
			
		||||
        //   //console.log("TODO: 监听的字段还没来得及设置值呢...");
 | 
			
		||||
        // }
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -80,7 +80,7 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id) {
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      console.log("[BatchDialog--detail] init", id);
 | 
			
		||||
      //console.log("[BatchDialog--detail] init", id);
 | 
			
		||||
      this.batchId = id;
 | 
			
		||||
      this.getBatchDetailList();
 | 
			
		||||
    },
 | 
			
		||||
@@ -98,7 +98,7 @@ export default {
 | 
			
		||||
            batchId: this.batchId,
 | 
			
		||||
          },
 | 
			
		||||
        });
 | 
			
		||||
        console.log("[BatchDialog] getBatchList", data);
 | 
			
		||||
        //console.log("[BatchDialog] getBatchList", data);
 | 
			
		||||
        if (code == 0) {
 | 
			
		||||
          this.dataList = data.list;
 | 
			
		||||
          this.total = data.total;
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ export default {
 | 
			
		||||
          data: { code, data, msg },
 | 
			
		||||
        } = await this.$http.get("/pms/blenderBatch/" + batchId);
 | 
			
		||||
        if (code == 0) {
 | 
			
		||||
          console.log("[BatchDialog] getBatch", data);
 | 
			
		||||
          //console.log("[BatchDialog] getBatch", data);
 | 
			
		||||
          this.$set(this.dataForm, "id", data.id);
 | 
			
		||||
          this.$set(this.dataForm, "batchSize", data.batchSize);
 | 
			
		||||
        } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -148,7 +148,7 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id) {
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      console.log("[BatchDialog] init", id);
 | 
			
		||||
      //console.log("[BatchDialog] init", id);
 | 
			
		||||
      this.blenderOrderId = id;
 | 
			
		||||
      this.getBatchList();
 | 
			
		||||
    },
 | 
			
		||||
@@ -166,7 +166,7 @@ export default {
 | 
			
		||||
            blenderOrderId: this.blenderOrderId,
 | 
			
		||||
          },
 | 
			
		||||
        });
 | 
			
		||||
        console.log("[BatchDialog] getBatchList", data);
 | 
			
		||||
        //console.log("[BatchDialog] getBatchList", data);
 | 
			
		||||
        if (code == 0) {
 | 
			
		||||
          this.dataList = data.list;
 | 
			
		||||
          this.total = data.total;
 | 
			
		||||
@@ -185,7 +185,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("[BatchDialog] handleOperate", type, data);
 | 
			
		||||
      //console.log("[BatchDialog] handleOperate", type, data);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "create":
 | 
			
		||||
          this.editDialogVisible = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -165,7 +165,7 @@ export default {
 | 
			
		||||
          else if (col.fetchTreeData) {
 | 
			
		||||
            // 获取设备类型时触发的,用于前端构建属性结构,约定,parentId 为0时是顶级节点
 | 
			
		||||
            col.fetchTreeData().then(({ data: res }) => {
 | 
			
		||||
              // console.log("[DialogJustForm fetchTreeData -->]", res.data);
 | 
			
		||||
              // //console.log("[DialogJustForm fetchTreeData -->]", res.data);
 | 
			
		||||
              if (res.code === 0 && res.data) {
 | 
			
		||||
                if ("list" in res.data) {
 | 
			
		||||
                  this.$set(col, "options", res.data.list);
 | 
			
		||||
@@ -198,7 +198,7 @@ export default {
 | 
			
		||||
        row.forEach((col) => {
 | 
			
		||||
          if (!col.prop) return;
 | 
			
		||||
          if ("injectTo" in col && Array.isArray(col.injectTo)) {
 | 
			
		||||
            // console.log("watching options ..... ", col);
 | 
			
		||||
            // //console.log("watching options ..... ", col);
 | 
			
		||||
            col.injectTo.map((item) => {
 | 
			
		||||
              const unwatch = this.$watch(
 | 
			
		||||
                () => this.dataForm[col.prop],
 | 
			
		||||
@@ -264,7 +264,7 @@ export default {
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            this.dataForm[key] = null;
 | 
			
		||||
          });
 | 
			
		||||
          // console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          // //console.log("[DialogJustForm resetForm()] clearing form...");
 | 
			
		||||
          this.$refs.dataForm.clearValidate();
 | 
			
		||||
          this.$emit("dialog-closed"); // 触发父组件销毁自己
 | 
			
		||||
          this.watchList.map((unwatch) => unwatch());
 | 
			
		||||
@@ -277,9 +277,9 @@ export default {
 | 
			
		||||
    /** init **/
 | 
			
		||||
    init(id, detailMode) {
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      // console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      // //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
 | 
			
		||||
      if (this.$refs.dataForm) {
 | 
			
		||||
        // console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // //console.log("[DialogJustForm] clearing form validation...");
 | 
			
		||||
        // 当不是首次渲染dialog的时候,一开始就清空验证信息,本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
 | 
			
		||||
        this.$refs.dataForm.clearValidate();
 | 
			
		||||
      }
 | 
			
		||||
@@ -306,7 +306,7 @@ export default {
 | 
			
		||||
                    url: file.fileUrl,
 | 
			
		||||
                  }));
 | 
			
		||||
                }
 | 
			
		||||
                // console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
                // //console.log("[DialogJustForm] init():", this.dataForm);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: `${res.code}: ${res.msg}`,
 | 
			
		||||
@@ -333,22 +333,22 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** handlers */
 | 
			
		||||
    handleSelectChange(col, eventValue) {
 | 
			
		||||
      // console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      // //console.log("[dialog] select change: ", col, eventValue);
 | 
			
		||||
      this.$forceUpdate();
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      // console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      // //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      // console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      // //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    addOrUpdate(method = "POST") {
 | 
			
		||||
      if ("parentId" in this.dataForm) {
 | 
			
		||||
        // console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        // //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
 | 
			
		||||
        // 对特殊的键做特殊处理,如 parentId 是一个 cascader,获取的值是 ["xxx"],后端只需要xxx
 | 
			
		||||
        const lastItem = this.dataForm.parentId.length - 1;
 | 
			
		||||
        this.dataForm.parentId = this.dataForm.parentId[lastItem];
 | 
			
		||||
@@ -400,7 +400,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
          // Object.getOwnPropertyNames(this.dataForm).forEach((prop) => {
 | 
			
		||||
          //   if (/.*?Time/.test(prop)) {
 | 
			
		||||
          //     console.log("HTTP prop", prop, this.dataForm[prop]);
 | 
			
		||||
          //     //console.log("HTTP prop", prop, this.dataForm[prop]);
 | 
			
		||||
          //   }
 | 
			
		||||
          // });
 | 
			
		||||
 | 
			
		||||
@@ -413,7 +413,7 @@ export default {
 | 
			
		||||
            data: httpPayload,
 | 
			
		||||
          })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              // console.log("[add&update] res is: ", res);
 | 
			
		||||
              // //console.log("[add&update] res is: ", res);
 | 
			
		||||
              this.loadingStatus = false;
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$message.success(method === "POST" ? "添加成功" : "更新成功");
 | 
			
		||||
@@ -438,7 +438,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      // console.log("btn click payload: ", payload);
 | 
			
		||||
      // //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -454,12 +454,12 @@ export default {
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
        //console.log("[x] 不是这么用的! 缺少name属性");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      // console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      // //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -110,7 +110,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSuccess(response, file, fileList) {
 | 
			
		||||
      // console.log("success response", response);
 | 
			
		||||
      // //console.log("success response", response);
 | 
			
		||||
 | 
			
		||||
      if ("code" in response && response.code === 500) {
 | 
			
		||||
        this.$message({
 | 
			
		||||
@@ -141,7 +141,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleError(err, file, fileList) {
 | 
			
		||||
      console.log("err", err);
 | 
			
		||||
      //console.log("err", err);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
@@ -174,7 +174,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadChange(file, fileList) {
 | 
			
		||||
      // console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
      // //console.log("[Upload] handleUploadChange...", file, fileList);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleClose() {
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleTabClick(tab) {
 | 
			
		||||
      console.log("handle tab click", tab);
 | 
			
		||||
      //console.log("handle tab click", tab);
 | 
			
		||||
      if (tab > this.oldActiveTab) this.toLeft = true;
 | 
			
		||||
      else this.toLeft = false;
 | 
			
		||||
      switch (tab) {
 | 
			
		||||
@@ -89,7 +89,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** init **/
 | 
			
		||||
    init(order, detailMode) {
 | 
			
		||||
      console.log("init menu dialog,", order);
 | 
			
		||||
      //console.log("init menu dialog,", order);
 | 
			
		||||
      this.order = order;
 | 
			
		||||
      this.detailMode = detailMode ?? false;
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -156,7 +156,7 @@ export default {
 | 
			
		||||
            if ("list" in res.data) {
 | 
			
		||||
              this.dataList = res.data.list;
 | 
			
		||||
              this.totalPage = res.data.total;
 | 
			
		||||
            } else console.log("没有res.data.list属性");
 | 
			
		||||
            }  
 | 
			
		||||
          } else {
 | 
			
		||||
            this.dataList.splice(0);
 | 
			
		||||
            this.totalPage = 0;
 | 
			
		||||
@@ -183,7 +183,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -221,7 +221,7 @@ export default {
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
            .catch((errMsg) => {
 | 
			
		||||
              console.log("ere...");
 | 
			
		||||
              //console.log("ere...");
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: errMsg,
 | 
			
		||||
                type: "error",
 | 
			
		||||
@@ -346,7 +346,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "view-ongoing": {
 | 
			
		||||
          console.log("view-ongoing", data);
 | 
			
		||||
          //console.log("view-ongoing", data);
 | 
			
		||||
          this.openMenuDialog(data, false);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -358,12 +358,12 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("SearchForm", btnName, payload);
 | 
			
		||||
      //console.log("SearchForm", btnName, payload);
 | 
			
		||||
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "查询": {
 | 
			
		||||
          this.params = Object.assign({}, payload);
 | 
			
		||||
          console.log("this.params", this.params);
 | 
			
		||||
          //console.log("this.params", this.params);
 | 
			
		||||
          if ("timerange" in payload) {
 | 
			
		||||
            // 处理时间段
 | 
			
		||||
            if (!!payload.timerange) {
 | 
			
		||||
@@ -421,7 +421,7 @@ export default {
 | 
			
		||||
      this.renderDialog = true;
 | 
			
		||||
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        // console.log("init dialog", row_id, detail_mode);
 | 
			
		||||
        // //console.log("init dialog", row_id, detail_mode);
 | 
			
		||||
        this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -148,7 +148,7 @@ export default {
 | 
			
		||||
  watch: {
 | 
			
		||||
    $route: function (route) {
 | 
			
		||||
      if (route.hash) {
 | 
			
		||||
        console.log("acitive hash", route.hash);
 | 
			
		||||
        //console.log("acitive hash", route.hash);
 | 
			
		||||
        this.activeTable = route.hash;
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
@@ -269,7 +269,7 @@ export default {
 | 
			
		||||
  inject: ["urls"],
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getSpecificList("ongoing", this.conditions.ongoing);
 | 
			
		||||
    console.log("[list view with head]", this.headConfigs);
 | 
			
		||||
    //console.log("[list view with head]", this.headConfigs);
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
@@ -296,7 +296,7 @@ export default {
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
            this.dataLists[type] = res.data.list;
 | 
			
		||||
            this.totalPage[type] = res.data.total;
 | 
			
		||||
          } else console.log("没有res.data.list属性");
 | 
			
		||||
          }  
 | 
			
		||||
        } else {
 | 
			
		||||
          this.dataLists[type].splice(0);
 | 
			
		||||
          this.totalPage[type] = 0;
 | 
			
		||||
@@ -339,7 +339,7 @@ export default {
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          // page 场景:
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
@@ -360,7 +360,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -404,7 +404,7 @@ export default {
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "status": {
 | 
			
		||||
          console.log("status", data);
 | 
			
		||||
          //console.log("status", data);
 | 
			
		||||
          // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
          const { id, code } = data;
 | 
			
		||||
          const queryCondition = { id, code };
 | 
			
		||||
@@ -448,13 +448,13 @@ export default {
 | 
			
		||||
              }
 | 
			
		||||
              delete params.timerange;
 | 
			
		||||
            }
 | 
			
		||||
            console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
 | 
			
		||||
            //console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
 | 
			
		||||
            // 发起请求
 | 
			
		||||
            this.getSpecificList("ongoing", Object.assign({}, this.conditions.ongoing, params));
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        case "pending":
 | 
			
		||||
          console.log("[search form btn click]", type, btnName, payload);
 | 
			
		||||
          //console.log("[search form btn click]", type, btnName, payload);
 | 
			
		||||
          if (btnName === "压制工艺") {
 | 
			
		||||
            // 跳转至压制工艺页面
 | 
			
		||||
            alert("跳转至压制工艺页面");
 | 
			
		||||
@@ -470,7 +470,7 @@ export default {
 | 
			
		||||
        case "finished":
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
      // console.log("[search] form handleBtnClick", type, btnName, payload);
 | 
			
		||||
      // //console.log("[search] form handleBtnClick", type, btnName, payload);
 | 
			
		||||
      // switch (btnName) {
 | 
			
		||||
      //   case "新增":
 | 
			
		||||
      //     this.openDialog();
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleOperate({ type, data: id }) {
 | 
			
		||||
      console.log("payload", type, id);
 | 
			
		||||
      //console.log("payload", type, id);
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "blender-edit":
 | 
			
		||||
          this.blenderOrderEditVisible = true;
 | 
			
		||||
@@ -108,7 +108,7 @@ export default {
 | 
			
		||||
            type: "warning",
 | 
			
		||||
          })
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              console.log("here");
 | 
			
		||||
              //console.log("here");
 | 
			
		||||
              this.$http
 | 
			
		||||
                .post(this.urls.detach, id /* { id: data } */, { headers: { "Content-Type": "application/json" } })
 | 
			
		||||
                .then(({ data: res }) => {
 | 
			
		||||
@@ -159,7 +159,7 @@ export default {
 | 
			
		||||
        ...this.extraQueryFields,
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      console.log("getAlist", data, this.pageIsPost);
 | 
			
		||||
      //console.log("getAlist", data, this.pageIsPost);
 | 
			
		||||
 | 
			
		||||
      return this.$http({
 | 
			
		||||
        url: this.urls.page ?? this.urls.base + "/page",
 | 
			
		||||
 
 | 
			
		||||
@@ -471,9 +471,9 @@
 | 
			
		||||
              <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
          <!-- :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]"> -->
 | 
			
		||||
          <!-- <el-col :span="6">
 | 
			
		||||
            <el-form-item label="托盘类型" prop="palletType">
 | 
			
		||||
              <!-- :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]"> -->
 | 
			
		||||
              <el-select
 | 
			
		||||
                v-model="dataForm.palletType"
 | 
			
		||||
                filterable
 | 
			
		||||
@@ -487,7 +487,7 @@
 | 
			
		||||
                  :value="pt.dictValue"></el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          </el-col> -->
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="贴纸板"
 | 
			
		||||
@@ -769,7 +769,7 @@ export default {
 | 
			
		||||
     * 因为每个页面也许有独立的需求链
 | 
			
		||||
     */
 | 
			
		||||
    handleBomChange(bomID) {
 | 
			
		||||
      console.log("[handleBomChange] val is: ", bomID);
 | 
			
		||||
      //console.log("[handleBomChange] val is: ", bomID);
 | 
			
		||||
      const target = this.cachedList.bom.find((item) => item.id === bomID);
 | 
			
		||||
      // 这个单独的 bomId 是个极其特殊的需求,所以不放在 dataForm 里
 | 
			
		||||
      this.bomId = bomID;
 | 
			
		||||
@@ -781,7 +781,7 @@ export default {
 | 
			
		||||
    async getBomVersionList(bom) {
 | 
			
		||||
      try {
 | 
			
		||||
        const { data: res } = await this.$http.get("/pms/bom/pageVersion", { params: { key: bom.code } });
 | 
			
		||||
        console.log("[bom version list]", res.data.list);
 | 
			
		||||
        //console.log("[bom version list]", res.data.list);
 | 
			
		||||
        this.versionList = res.data.list.map((item) => ({
 | 
			
		||||
          label: item.version,
 | 
			
		||||
          value: item.version,
 | 
			
		||||
@@ -800,7 +800,7 @@ export default {
 | 
			
		||||
      const targetBom = this.versionList.find((item) => item.value === v);
 | 
			
		||||
      // this.bomId 用于在提交的时候置换 this.dataForm.bomId
 | 
			
		||||
      this.bomId = targetBom.id;
 | 
			
		||||
      console.log("[handleVersionChange] new bomID", this.bomId);
 | 
			
		||||
      //console.log("[handleVersionChange] new bomID", this.bomId);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    async init(id, detail_mode) {
 | 
			
		||||
@@ -892,18 +892,23 @@ export default {
 | 
			
		||||
                ai: null, // 这两项都不需要,后端通过BOM ID可以唯一确定
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
            this.btnLoading = false;
 | 
			
		||||
 | 
			
		||||
            console.log("herer.......", res);
 | 
			
		||||
            if (res && res.code == 0) {
 | 
			
		||||
              this.$message.success("添加成功");
 | 
			
		||||
              this.$emit("refreshDataList");
 | 
			
		||||
              this.handleClose();
 | 
			
		||||
              this.btnLoading = false;
 | 
			
		||||
            } else {
 | 
			
		||||
              throw new Error("请求出错");
 | 
			
		||||
              return this.$message({
 | 
			
		||||
                message: `${res.code}: ${res.msg}`,
 | 
			
		||||
                type: "error",
 | 
			
		||||
                duration: 1500,
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          } catch (err) {
 | 
			
		||||
            this.$message.error("参数错误:" + "msg" in err ? err.msg : err);
 | 
			
		||||
            this.$message.error(
 | 
			
		||||
              err.isServerFeedback ? `${err.code}: ${err.msg}` : "参数错误:" + "msg" in err ? err.msg : err
 | 
			
		||||
            );
 | 
			
		||||
            this.btnLoading = false;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -109,7 +109,7 @@ export default {
 | 
			
		||||
  mounted() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    init({ id, blender, blenderCode, bomCode, bomId, bomName, code, orderCode, orderId }) {
 | 
			
		||||
      // console.log("[blenderOrderEdit] init");
 | 
			
		||||
      // //console.log("[blenderOrderEdit] init");
 | 
			
		||||
      Promise.all([this.getBlenderList(), this.getBomList(bomCode)])
 | 
			
		||||
        .then((r1, r2) => {
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
@@ -121,7 +121,7 @@ export default {
 | 
			
		||||
          this.visible = true;
 | 
			
		||||
        })
 | 
			
		||||
        .catch((err) => {
 | 
			
		||||
          console.log(err);
 | 
			
		||||
          //console.log(err);
 | 
			
		||||
          this.close();
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ export default {
 | 
			
		||||
    orderId: {
 | 
			
		||||
      handler: function (val) {
 | 
			
		||||
        if (val) {
 | 
			
		||||
          console.log("get car list based on orderId: ", val);
 | 
			
		||||
          //console.log("get car list based on orderId: ", val);
 | 
			
		||||
          this.getAList(val);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
@@ -125,7 +125,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  // activated() {
 | 
			
		||||
  //   console.log("hhh");
 | 
			
		||||
  //   //console.log("hhh");
 | 
			
		||||
  //   this.refreshLayoutKey = Math.random();
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -218,7 +218,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getAList(orderId) {
 | 
			
		||||
      console.log("geting car list, ", orderId);
 | 
			
		||||
      //console.log("geting car list, ", orderId);
 | 
			
		||||
      if (!orderId) orderId = this.orderId;
 | 
			
		||||
 | 
			
		||||
      this.tableLoading = true;
 | 
			
		||||
@@ -227,7 +227,7 @@ export default {
 | 
			
		||||
          if ("list" in res.data) {
 | 
			
		||||
            this.dataList = res.data.list;
 | 
			
		||||
            this.totalPage = res.data.total;
 | 
			
		||||
          } else console.log("没有res.data.list属性");
 | 
			
		||||
          }  
 | 
			
		||||
        } else {
 | 
			
		||||
          this.dataList.splice(0);
 | 
			
		||||
          this.totalPage = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -462,7 +462,7 @@
 | 
			
		||||
              <span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
          <!-- <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="托盘类型"
 | 
			
		||||
              prop="palletType"
 | 
			
		||||
@@ -480,7 +480,7 @@
 | 
			
		||||
                  :value="pt.dictValue"></el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-col>
 | 
			
		||||
          </el-col> -->
 | 
			
		||||
          <el-col :span="6">
 | 
			
		||||
            <el-form-item
 | 
			
		||||
              label="贴纸板"
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  created() { },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log('this.order', this.order)
 | 
			
		||||
    //console.log('this.order', this.order)
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ export default {
 | 
			
		||||
          hisId: this.hisId,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("temp dialog res", res);
 | 
			
		||||
          //console.log("temp dialog res", res);
 | 
			
		||||
          this.tableLoading = false;
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            if ("list" in res.data) {
 | 
			
		||||
 
 | 
			
		||||
@@ -84,13 +84,13 @@ export default {
 | 
			
		||||
          this.keys[name] = Math.random().toString();
 | 
			
		||||
        });
 | 
			
		||||
      } else {
 | 
			
		||||
        console.log("handleRefreshTable 需要传递数组!");
 | 
			
		||||
        //console.log("handleRefreshTable 需要传递数组!");
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    cellClassName({ row, column, rowIndex, columnIndex }) {
 | 
			
		||||
      if ("statusDictValue" in row && row.statusDictValue == "2") {
 | 
			
		||||
        // console.log("setting cell style.....", row);
 | 
			
		||||
        // //console.log("setting cell style.....", row);
 | 
			
		||||
        return "cell-in-production";
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,8 @@ export default {
 | 
			
		||||
  // components: { BaseSearchForm },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      hu: "40032179#300000624000000016",
 | 
			
		||||
      // hu: "40032179#300000624000000016",
 | 
			
		||||
      hu: ''
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ export default function () {
 | 
			
		||||
            button: true,
 | 
			
		||||
            onClick: function (id) {
 | 
			
		||||
              // 必须用 function 形式
 | 
			
		||||
              console.log(`查看载砖详情`, id);
 | 
			
		||||
              //console.log(`查看载砖详情`, id);
 | 
			
		||||
              this.$emit("emit-data", { type: "to-car-payload", data: id });
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
 
 | 
			
		||||
@@ -87,7 +87,7 @@ export default function () {
 | 
			
		||||
            button: true,
 | 
			
		||||
            onClick: function (id) {
 | 
			
		||||
              // 必须用 function 形式
 | 
			
		||||
              console.log(`查看载砖详情`, id);
 | 
			
		||||
              //console.log(`查看载砖详情`, id);
 | 
			
		||||
              this.$emit("emit-data", { type: "to-car-payload", data: id });
 | 
			
		||||
            },
 | 
			
		||||
          },
 | 
			
		||||
 
 | 
			
		||||
@@ -112,7 +112,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    //console.log("list view with ehad activated..........", this.triggerUpdate);
 | 
			
		||||
    this.refreshLayoutKey = this.layoutTable();
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
@@ -182,7 +182,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -221,7 +221,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -290,7 +290,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "status": {
 | 
			
		||||
        //   console.log("status", data);
 | 
			
		||||
        //   //console.log("status", data);
 | 
			
		||||
        //   // TODO: 类似于这种字符串,可以统一集中到一个文件里
 | 
			
		||||
        //   const { id, code } = data;
 | 
			
		||||
        //   const queryCondition = { id, code };
 | 
			
		||||
@@ -319,7 +319,7 @@ export default {
 | 
			
		||||
        //   break;
 | 
			
		||||
        // }
 | 
			
		||||
        // case "to-bom-detail": {
 | 
			
		||||
        //   // console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // //console.log('to-bom-detail', data.name)
 | 
			
		||||
        //   // 查看配方详情
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-bomDetails",
 | 
			
		||||
@@ -380,7 +380,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "preview": {
 | 
			
		||||
        //   console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   //console.log("[PREVIEW] data", data);
 | 
			
		||||
        //   // report preview
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportPreview",
 | 
			
		||||
@@ -390,7 +390,7 @@ export default {
 | 
			
		||||
        //   });
 | 
			
		||||
        // }
 | 
			
		||||
        // case "design": {
 | 
			
		||||
        //   console.log("[DESIGN] data", data);
 | 
			
		||||
        //   //console.log("[DESIGN] data", data);
 | 
			
		||||
        //   // report design
 | 
			
		||||
        //   return this.$router.push({
 | 
			
		||||
        //     name: "pms-reportDesign",
 | 
			
		||||
@@ -456,7 +456,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -499,7 +499,7 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -538,7 +538,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -98,12 +98,12 @@ export default function () {
 | 
			
		||||
      listenTo: {
 | 
			
		||||
        prop: 'carId', // 应该监听 carId,随 carId 而更新,
 | 
			
		||||
        handler: function (carList, carId) {
 | 
			
		||||
          console.log('this. ', carList, this.cachedList)
 | 
			
		||||
          //console.log('this. ', carList, this.cachedList)
 | 
			
		||||
          const car = carList.find(item => item.carId === carId)
 | 
			
		||||
          console.log('car. ', car)
 | 
			
		||||
          //console.log('car. ', car)
 | 
			
		||||
          // 需要 bind 
 | 
			
		||||
          this.$set(this.dataForm, 'hisId', car.id)
 | 
			
		||||
          console.log('this.dataForm.hisId', this.dataForm, this.dataForm.hisId)
 | 
			
		||||
          //console.log('this.dataForm.hisId', this.dataForm, this.dataForm.hisId)
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }],
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ export default {
 | 
			
		||||
  //     handler: function (route) {
 | 
			
		||||
  //       if (route.query.id) {
 | 
			
		||||
  //         this.triggerUpdateKey = Math.random().toString();
 | 
			
		||||
  //         console.log("[$oute changed] val.params.id", route.query.id, this.triggerUpdateKey);
 | 
			
		||||
  //         //console.log("[$oute changed] val.params.id", route.query.id, this.triggerUpdateKey);
 | 
			
		||||
  //       }
 | 
			
		||||
  //     },
 | 
			
		||||
  //     immediate: true,
 | 
			
		||||
@@ -51,11 +51,11 @@ export default {
 | 
			
		||||
  // },
 | 
			
		||||
  mounted() {},
 | 
			
		||||
  activated() {
 | 
			
		||||
    // console.log("activated...");
 | 
			
		||||
    // //console.log("activated...");
 | 
			
		||||
    this.triggerUpdateKey = Math.random().toString();
 | 
			
		||||
  },
 | 
			
		||||
  // deactivated() {
 | 
			
		||||
  //   console.log("deactivated...");
 | 
			
		||||
  //   //console.log("deactivated...");
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {},
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ export default {
 | 
			
		||||
        params: {},
 | 
			
		||||
      }).then(({ data: res }) => {
 | 
			
		||||
        this.allNum = 0;
 | 
			
		||||
        console.log("报表", res);
 | 
			
		||||
        //console.log("报表", res);
 | 
			
		||||
 | 
			
		||||
        if (res.code === 0 && res.data) {
 | 
			
		||||
          if (Array.isArray(res.data)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,12 +17,12 @@ const CategoryList = {
 | 
			
		||||
    return { list: [], calcMaxHeight, pickedId: null }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log(this.injectData)
 | 
			
		||||
    //console.log(this.injectData)
 | 
			
		||||
    if (categoryOptions.length === 0) {
 | 
			
		||||
      // 获取并缓存 categoryOptions
 | 
			
		||||
      axios.get('/pms/reportSheetCategory/list').then(({ data: res }) => {
 | 
			
		||||
        if (res.code === 0) {
 | 
			
		||||
          console.log('[CategoryList小组件]', res.data)
 | 
			
		||||
          //console.log('[CategoryList小组件]', res.data)
 | 
			
		||||
          categoryOptions = res.data
 | 
			
		||||
        } else {
 | 
			
		||||
          categoryOptions.splice(0)
 | 
			
		||||
@@ -52,7 +52,7 @@ const CategoryList = {
 | 
			
		||||
  render: function (h) {
 | 
			
		||||
    const childOptions = []
 | 
			
		||||
    this.injectData.head.options?.forEach(item => {
 | 
			
		||||
      console.log('【报表分类】', item.value)
 | 
			
		||||
      //console.log('【报表分类】', item.value)
 | 
			
		||||
      childOptions.push(h('el-option', { props: { label: item.label, value: item.value } }, null))
 | 
			
		||||
    })
 | 
			
		||||
    return h('el-select', { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions)
 | 
			
		||||
@@ -64,7 +64,7 @@ export default async function () {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  if (Array.isArray(categoryList)) {
 | 
			
		||||
    console.log('category ====> ', categoryList)
 | 
			
		||||
    //console.log('category ====> ', categoryList)
 | 
			
		||||
    const tableProps = [
 | 
			
		||||
      { type: 'index', label: '序号' },
 | 
			
		||||
      { prop: "fileName", label: "报表名称" },
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ const CategoryList = {
 | 
			
		||||
    return { pickedId: null };
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    // console.log(this.injectData)
 | 
			
		||||
    // //console.log(this.injectData)
 | 
			
		||||
    this.pickedId = this.injectData[this.injectData.head.prop];
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
@@ -32,7 +32,7 @@ const CategoryList = {
 | 
			
		||||
  render: function (h) {
 | 
			
		||||
    const childOptions = [];
 | 
			
		||||
    this.injectData.head.options?.forEach((item) => {
 | 
			
		||||
      // console.log('【报表分类】', item.value)
 | 
			
		||||
      // //console.log('【报表分类】', item.value)
 | 
			
		||||
      childOptions.push(h("el-option", { props: { label: item.label, value: item.value } }, null));
 | 
			
		||||
    });
 | 
			
		||||
    return h("el-select", { props: { size: 'mini', value: this.pickedId }, on: { change: this.handleChange } }, childOptions);
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ export default {
 | 
			
		||||
    // 	this.dialogConfigs = dialogConfigs
 | 
			
		||||
    // });
 | 
			
		||||
    fetchCategoryList.call(this).then((categoryList) => {
 | 
			
		||||
      console.log("[fetchCategoryList() then...]");
 | 
			
		||||
      //console.log("[fetchCategoryList() then...]");
 | 
			
		||||
      if ("column" in this.tableConfig) {
 | 
			
		||||
        const categoryProp = this.tableConfig.column.find((item) => item.prop === "category");
 | 
			
		||||
        this.$set(
 | 
			
		||||
@@ -40,7 +40,7 @@ export default {
 | 
			
		||||
          "options",
 | 
			
		||||
          categoryList.map((item) => ({ label: item.name, value: item.id }))
 | 
			
		||||
        );
 | 
			
		||||
        console.log("[报表, 设置options成功..]", categoryProp);
 | 
			
		||||
        //console.log("[报表, 设置options成功..]", categoryProp);
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -295,7 +295,7 @@ export default {
 | 
			
		||||
     * @description: 从配置项中提取出需要监听的项
 | 
			
		||||
     */
 | 
			
		||||
    initWatchList() {
 | 
			
		||||
      console.log("[DWM initWatchList]");
 | 
			
		||||
      //console.log("[DWM initWatchList]");
 | 
			
		||||
      this.configs.form.rows.forEach((row) => {
 | 
			
		||||
        row.forEach((col) => {
 | 
			
		||||
          /** 找到配置项中含有 changeReflects 属性的项 */
 | 
			
		||||
@@ -321,7 +321,7 @@ export default {
 | 
			
		||||
     * @description: 开始监听事件
 | 
			
		||||
     */
 | 
			
		||||
    startWatchProcess() {
 | 
			
		||||
      console.log("[DWM startWatchProcess]");
 | 
			
		||||
      //console.log("[DWM startWatchProcess]");
 | 
			
		||||
      if (this.watchList.length) {
 | 
			
		||||
        this.watchList.forEach((item) => {
 | 
			
		||||
          this.handleWatch(item.targetProp, item.followerProp, this.cached);
 | 
			
		||||
@@ -339,7 +339,7 @@ export default {
 | 
			
		||||
      this.$watch(
 | 
			
		||||
        () => this.dataForm[targetProp],
 | 
			
		||||
        (val) => {
 | 
			
		||||
          console.log("[DWM watch]");
 | 
			
		||||
          //console.log("[DWM watch]");
 | 
			
		||||
          if (val && targetProp in dataSource) {
 | 
			
		||||
            this.dataForm[followerProp] = dataSource[targetProp]?.find((item) => item.id === val)?.[followerProp];
 | 
			
		||||
          }
 | 
			
		||||
@@ -378,19 +378,19 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 准备选择器的列表 */
 | 
			
		||||
    async doRequests() {
 | 
			
		||||
      console.log("[DWM doRequests] requestList", this.requestList);
 | 
			
		||||
      //console.log("[DWM doRequests] requestList", this.requestList);
 | 
			
		||||
      if (this.requestList.length) {
 | 
			
		||||
        const promiseList = [];
 | 
			
		||||
        try {
 | 
			
		||||
          this.requestList.forEach((opt) => {
 | 
			
		||||
            console.log("[DWM doRequests]", opt.fetchData);
 | 
			
		||||
            //console.log("[DWM doRequests]", opt.fetchData);
 | 
			
		||||
            promiseList.push(async () => {
 | 
			
		||||
              this.optionsLoading = true;
 | 
			
		||||
              const { data: res } = await opt.fetchData(
 | 
			
		||||
                opt.fetchDataNeedsId ? this.dataForm.id : undefined
 | 
			
		||||
              );
 | 
			
		||||
              if (opt.cacheFetchedData) this.cached[opt.prop] = "list" in res.data ? res.data.list : res.data || [];
 | 
			
		||||
              console.log("[DWM doRequests] res", res);
 | 
			
		||||
              //console.log("[DWM doRequests] res", res);
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$set(
 | 
			
		||||
                  opt,
 | 
			
		||||
@@ -417,7 +417,7 @@ export default {
 | 
			
		||||
                        value: opt.optionValue ? i[opt.optionValue] : i.id,
 | 
			
		||||
                      }))
 | 
			
		||||
                );
 | 
			
		||||
                console.log("[DWM doRequests] set options", opt);
 | 
			
		||||
                //console.log("[DWM doRequests] set options", opt);
 | 
			
		||||
              } else {
 | 
			
		||||
                // res.code != 0
 | 
			
		||||
                this.$set(opt, "options", []);
 | 
			
		||||
@@ -446,11 +446,11 @@ export default {
 | 
			
		||||
          this.$http.get(this.urls.base + `/${id}`).then(({ data: res }) => {
 | 
			
		||||
            if (res && res.code === 0) {
 | 
			
		||||
              const dataFormKeys = Object.keys(this.dataForm);
 | 
			
		||||
              console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
              //console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
 | 
			
		||||
              this.dataForm = __pick(res.data, dataFormKeys);
 | 
			
		||||
              if ("files" in res.data) {
 | 
			
		||||
                console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                //console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                /** 返回的文件列表 */
 | 
			
		||||
                this.fileList = res.data.files
 | 
			
		||||
                  ? res.data.files.map((file) => ({
 | 
			
		||||
@@ -507,7 +507,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
      /** 获取请求 */
 | 
			
		||||
      this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
 | 
			
		||||
        console.log("[DWM getSubList]", res);
 | 
			
		||||
        //console.log("[DWM getSubList]", res);
 | 
			
		||||
        if (res.code === 0 && res.data?.list) {
 | 
			
		||||
          this.subList = res.data.list;
 | 
			
		||||
          this.attrTotal = res.data.total;
 | 
			
		||||
@@ -538,7 +538,7 @@ export default {
 | 
			
		||||
      setTimeout(
 | 
			
		||||
        () => {
 | 
			
		||||
          Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
            console.log("reset form, key", key);
 | 
			
		||||
            //console.log("reset form, key", key);
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            if ("files" in this.dataForm) this.dataForm.files = [];
 | 
			
		||||
            else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
 | 
			
		||||
@@ -549,7 +549,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
          this.activeMenu = this.configs.menu[0].name;
 | 
			
		||||
          this.$refs.dataForm[0].resetFields();
 | 
			
		||||
          console.log("清除Form...", this.dataForm);
 | 
			
		||||
          //console.log("清除Form...", this.dataForm);
 | 
			
		||||
        },
 | 
			
		||||
        immediate ? 0 : 200
 | 
			
		||||
      );
 | 
			
		||||
@@ -599,7 +599,7 @@ export default {
 | 
			
		||||
              responseType: "blob",
 | 
			
		||||
            })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              console.log("preivew", res);
 | 
			
		||||
              //console.log("preivew", res);
 | 
			
		||||
              if (/image/i.test(res.type)) {
 | 
			
		||||
                // 显示图片
 | 
			
		||||
                this.currentImgUrl = URL.createObjectURL(res);
 | 
			
		||||
@@ -610,9 +610,9 @@ export default {
 | 
			
		||||
                a.setAttribute("target", "_blank");
 | 
			
		||||
                a.href = URL.createObjectURL(res);
 | 
			
		||||
                a.click();
 | 
			
		||||
                console.log("before remove a ", a);
 | 
			
		||||
                //console.log("before remove a ", a);
 | 
			
		||||
                a.remove();
 | 
			
		||||
                console.log("removed a ", a);
 | 
			
		||||
                //console.log("removed a ", a);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "非图片和PDF文件请下载后预览",
 | 
			
		||||
@@ -692,7 +692,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
      console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
      //console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
 | 
			
		||||
      if (response.code === 0) {
 | 
			
		||||
        const uploadedFile = response.data[0];
 | 
			
		||||
@@ -732,7 +732,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadCheck(file) {
 | 
			
		||||
      console.log("[before upload]", file);
 | 
			
		||||
      //console.log("[before upload]", file);
 | 
			
		||||
      const LIMIT = 2 * 1024 * 1024; // bytes
 | 
			
		||||
      if (file.size > LIMIT) {
 | 
			
		||||
        this.$message({
 | 
			
		||||
@@ -746,17 +746,17 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSelectChange(col, eventValue) {},
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -804,7 +804,7 @@ export default {
 | 
			
		||||
                  .then(({ data: res }) => {
 | 
			
		||||
                    this.btnLoading = false;
 | 
			
		||||
                    this.formLoading = false;
 | 
			
		||||
                    console.log("[add&update] res is: ", res);
 | 
			
		||||
                    //console.log("[add&update] res is: ", res);
 | 
			
		||||
                    if (res.code === 0) {
 | 
			
		||||
                      this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
 | 
			
		||||
                      this.$emit("refreshDataList");
 | 
			
		||||
@@ -858,19 +858,19 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 列表handlers */
 | 
			
		||||
    handleAddItem() {
 | 
			
		||||
      // console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      // //console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      this.showBaseDialog = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
        //console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    handleTableRowOperate({ type, data }) {
 | 
			
		||||
      console.log("handleTableRowOperate", type, data);
 | 
			
		||||
      //console.log("handleTableRowOperate", type, data);
 | 
			
		||||
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "delete": {
 | 
			
		||||
          // 确认是否删除
 | 
			
		||||
          console.log("delete....", data);
 | 
			
		||||
          //console.log("delete....", data);
 | 
			
		||||
          const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
 | 
			
		||||
          return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
 | 
			
		||||
            confirmButtonText: "确认",
 | 
			
		||||
 
 | 
			
		||||
@@ -107,10 +107,10 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    page: (val) => {
 | 
			
		||||
      console.log("page changed:", val);
 | 
			
		||||
      //console.log("page changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    size: (val) => {
 | 
			
		||||
      console.log("size changed:", val);
 | 
			
		||||
      //console.log("size changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    triggerUpdate(val, oldVal) {
 | 
			
		||||
      if (val && val !== oldVal) {
 | 
			
		||||
@@ -183,7 +183,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -243,7 +243,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -299,7 +299,7 @@ export default {
 | 
			
		||||
            .catch((err) => {});
 | 
			
		||||
        }
 | 
			
		||||
        case "edit": {
 | 
			
		||||
          console.log("[edit] ", data);
 | 
			
		||||
          //console.log("[edit] ", data);
 | 
			
		||||
          this.openDialog(data); /** data is ==> id */
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -322,7 +322,7 @@ export default {
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              //
 | 
			
		||||
              let payload = "";
 | 
			
		||||
              console.log("copying...", type, data);
 | 
			
		||||
              //console.log("copying...", type, data);
 | 
			
		||||
              if (typeof data === "object") {
 | 
			
		||||
                const head = data.head;
 | 
			
		||||
                const copyOpt =
 | 
			
		||||
@@ -375,7 +375,7 @@ export default {
 | 
			
		||||
        case "sync": {
 | 
			
		||||
          let shouldShowOverlay = false;
 | 
			
		||||
          let payload = "";
 | 
			
		||||
          console.log("sync...", type, data);
 | 
			
		||||
          //console.log("sync...", type, data);
 | 
			
		||||
          if (typeof data === "object") {
 | 
			
		||||
            const head = data.head;
 | 
			
		||||
            const syncOpt =
 | 
			
		||||
@@ -413,7 +413,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -456,14 +456,14 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "同步":
 | 
			
		||||
        case "全部同步":
 | 
			
		||||
          this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
 | 
			
		||||
            console.log("同步", res);
 | 
			
		||||
            //console.log("同步", res);
 | 
			
		||||
            this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
 | 
			
		||||
            this.getList();
 | 
			
		||||
          });
 | 
			
		||||
@@ -495,7 +495,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -295,7 +295,7 @@ export default {
 | 
			
		||||
     * @description: 从配置项中提取出需要监听的项
 | 
			
		||||
     */
 | 
			
		||||
    initWatchList() {
 | 
			
		||||
      console.log("[DWM initWatchList]");
 | 
			
		||||
      //console.log("[DWM initWatchList]");
 | 
			
		||||
      this.configs.form.rows.forEach((row) => {
 | 
			
		||||
        row.forEach((col) => {
 | 
			
		||||
          /** 找到配置项中含有 changeReflects 属性的项 */
 | 
			
		||||
@@ -321,7 +321,7 @@ export default {
 | 
			
		||||
     * @description: 开始监听事件
 | 
			
		||||
     */
 | 
			
		||||
    startWatchProcess() {
 | 
			
		||||
      console.log("[DWM startWatchProcess]");
 | 
			
		||||
      //console.log("[DWM startWatchProcess]");
 | 
			
		||||
      if (this.watchList.length) {
 | 
			
		||||
        this.watchList.forEach((item) => {
 | 
			
		||||
          this.handleWatch(item.targetProp, item.followerProp, this.cached);
 | 
			
		||||
@@ -339,7 +339,7 @@ export default {
 | 
			
		||||
      this.$watch(
 | 
			
		||||
        () => this.dataForm[targetProp],
 | 
			
		||||
        (val) => {
 | 
			
		||||
          console.log("[DWM watch]");
 | 
			
		||||
          //console.log("[DWM watch]");
 | 
			
		||||
          if (val && targetProp in dataSource) {
 | 
			
		||||
            this.dataForm[followerProp] = dataSource[targetProp]?.find((item) => item.id === val)?.[followerProp];
 | 
			
		||||
          }
 | 
			
		||||
@@ -378,19 +378,19 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 准备选择器的列表 */
 | 
			
		||||
    async doRequests() {
 | 
			
		||||
      console.log("[DWM doRequests] requestList", this.requestList);
 | 
			
		||||
      //console.log("[DWM doRequests] requestList", this.requestList);
 | 
			
		||||
      if (this.requestList.length) {
 | 
			
		||||
        const promiseList = [];
 | 
			
		||||
        try {
 | 
			
		||||
          this.requestList.forEach((opt) => {
 | 
			
		||||
            console.log("[DWM doRequests]", opt.fetchData);
 | 
			
		||||
            //console.log("[DWM doRequests]", opt.fetchData);
 | 
			
		||||
            promiseList.push(async () => {
 | 
			
		||||
              this.optionsLoading = true;
 | 
			
		||||
              const { data: res } = await opt.fetchData(
 | 
			
		||||
                opt.fetchDataNeedsId ? this.dataForm.id : undefined
 | 
			
		||||
              );
 | 
			
		||||
              if (opt.cacheFetchedData) this.cached[opt.prop] = "list" in res.data ? res.data.list : res.data || [];
 | 
			
		||||
              console.log("[DWM doRequests] res", res);
 | 
			
		||||
              //console.log("[DWM doRequests] res", res);
 | 
			
		||||
              if (res.code === 0) {
 | 
			
		||||
                this.$set(
 | 
			
		||||
                  opt,
 | 
			
		||||
@@ -417,7 +417,7 @@ export default {
 | 
			
		||||
                        value: opt.optionValue ? i[opt.optionValue] : i.id,
 | 
			
		||||
                      }))
 | 
			
		||||
                );
 | 
			
		||||
                console.log("[DWM doRequests] set options", opt);
 | 
			
		||||
                //console.log("[DWM doRequests] set options", opt);
 | 
			
		||||
              } else {
 | 
			
		||||
                // res.code != 0
 | 
			
		||||
                this.$set(opt, "options", []);
 | 
			
		||||
@@ -446,11 +446,11 @@ export default {
 | 
			
		||||
          this.$http.get(this.urls.base + `/${id}`).then(({ data: res }) => {
 | 
			
		||||
            if (res && res.code === 0) {
 | 
			
		||||
              const dataFormKeys = Object.keys(this.dataForm);
 | 
			
		||||
              console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
              //console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
 | 
			
		||||
 | 
			
		||||
              this.dataForm = __pick(res.data, dataFormKeys);
 | 
			
		||||
              if ("files" in res.data) {
 | 
			
		||||
                console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                //console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
 | 
			
		||||
                /** 返回的文件列表 */
 | 
			
		||||
                this.fileList = res.data.files
 | 
			
		||||
                  ? res.data.files.map((file) => ({
 | 
			
		||||
@@ -507,7 +507,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
      /** 获取请求 */
 | 
			
		||||
      this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
 | 
			
		||||
        console.log("[DWM getSubList]", res);
 | 
			
		||||
        //console.log("[DWM getSubList]", res);
 | 
			
		||||
        if (res.code === 0 && res.data?.list) {
 | 
			
		||||
          this.subList = res.data.list;
 | 
			
		||||
          this.attrTotal = res.data.total;
 | 
			
		||||
@@ -538,7 +538,7 @@ export default {
 | 
			
		||||
      setTimeout(
 | 
			
		||||
        () => {
 | 
			
		||||
          Object.keys(this.dataForm).forEach((key) => {
 | 
			
		||||
            console.log("reset form, key", key);
 | 
			
		||||
            //console.log("reset form, key", key);
 | 
			
		||||
            if (excludeId && key === "id") return;
 | 
			
		||||
            if ("files" in this.dataForm) this.dataForm.files = [];
 | 
			
		||||
            else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
 | 
			
		||||
@@ -549,7 +549,7 @@ export default {
 | 
			
		||||
          });
 | 
			
		||||
          this.activeMenu = this.configs.menu[0].name;
 | 
			
		||||
          this.$refs.dataForm[0].resetFields();
 | 
			
		||||
          console.log("清除Form...", this.dataForm);
 | 
			
		||||
          //console.log("清除Form...", this.dataForm);
 | 
			
		||||
        },
 | 
			
		||||
        immediate ? 0 : 200
 | 
			
		||||
      );
 | 
			
		||||
@@ -599,7 +599,7 @@ export default {
 | 
			
		||||
              responseType: "blob",
 | 
			
		||||
            })
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              console.log("preivew", res);
 | 
			
		||||
              //console.log("preivew", res);
 | 
			
		||||
              if (/image/i.test(res.type)) {
 | 
			
		||||
                // 显示图片
 | 
			
		||||
                this.currentImgUrl = URL.createObjectURL(res);
 | 
			
		||||
@@ -610,9 +610,9 @@ export default {
 | 
			
		||||
                a.setAttribute("target", "_blank");
 | 
			
		||||
                a.href = URL.createObjectURL(res);
 | 
			
		||||
                a.click();
 | 
			
		||||
                console.log("before remove a ", a);
 | 
			
		||||
                //console.log("before remove a ", a);
 | 
			
		||||
                a.remove();
 | 
			
		||||
                console.log("removed a ", a);
 | 
			
		||||
                //console.log("removed a ", a);
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "非图片和PDF文件请下载后预览",
 | 
			
		||||
@@ -692,7 +692,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadSuccess(response, file, fileList) {
 | 
			
		||||
      console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
      //console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
 | 
			
		||||
 | 
			
		||||
      if (response.code === 0) {
 | 
			
		||||
        const uploadedFile = response.data[0];
 | 
			
		||||
@@ -732,7 +732,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleUploadCheck(file) {
 | 
			
		||||
      console.log("[before upload]", file);
 | 
			
		||||
      //console.log("[before upload]", file);
 | 
			
		||||
      const LIMIT = 2 * 1024 * 1024; // bytes
 | 
			
		||||
      if (file.size > LIMIT) {
 | 
			
		||||
        this.$message({
 | 
			
		||||
@@ -746,17 +746,17 @@ export default {
 | 
			
		||||
 | 
			
		||||
    handleComponentModelUpdate(propName, { subject, payload: { data } }) {
 | 
			
		||||
      this.dataForm[propName] = JSON.stringify(data);
 | 
			
		||||
      console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
      //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleSelectChange(col, eventValue) {},
 | 
			
		||||
 | 
			
		||||
    handleSwitchChange(val) {
 | 
			
		||||
      console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
      //console.log("[dialog] switch change: ", val, this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick(payload) {
 | 
			
		||||
      console.log("btn click payload: ", payload);
 | 
			
		||||
      //console.log("btn click payload: ", payload);
 | 
			
		||||
 | 
			
		||||
      if ("name" in payload) {
 | 
			
		||||
        switch (payload.name) {
 | 
			
		||||
@@ -804,7 +804,7 @@ export default {
 | 
			
		||||
                  .then(({ data: res }) => {
 | 
			
		||||
                    this.btnLoading = false;
 | 
			
		||||
                    this.formLoading = false;
 | 
			
		||||
                    console.log("[add&update] res is: ", res);
 | 
			
		||||
                    //console.log("[add&update] res is: ", res);
 | 
			
		||||
                    if (res.code === 0) {
 | 
			
		||||
                      this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
 | 
			
		||||
                      this.$emit("refreshDataList");
 | 
			
		||||
@@ -858,19 +858,19 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 列表handlers */
 | 
			
		||||
    handleAddItem() {
 | 
			
		||||
      // console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      // //console.log('[dialog] handleAddItem ot list...');
 | 
			
		||||
      this.showBaseDialog = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
        //console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    handleTableRowOperate({ type, data }) {
 | 
			
		||||
      console.log("handleTableRowOperate", type, data);
 | 
			
		||||
      //console.log("handleTableRowOperate", type, data);
 | 
			
		||||
 | 
			
		||||
      switch (type) {
 | 
			
		||||
        case "delete": {
 | 
			
		||||
          // 确认是否删除
 | 
			
		||||
          console.log("delete....", data);
 | 
			
		||||
          //console.log("delete....", data);
 | 
			
		||||
          const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
 | 
			
		||||
          return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
 | 
			
		||||
            confirmButtonText: "确认",
 | 
			
		||||
 
 | 
			
		||||
@@ -107,10 +107,10 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    page: (val) => {
 | 
			
		||||
      console.log("page changed:", val);
 | 
			
		||||
      //console.log("page changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    size: (val) => {
 | 
			
		||||
      console.log("size changed:", val);
 | 
			
		||||
      //console.log("size changed:", val);
 | 
			
		||||
    },
 | 
			
		||||
    triggerUpdate(val, oldVal) {
 | 
			
		||||
      if (val && val !== oldVal) {
 | 
			
		||||
@@ -183,7 +183,7 @@ export default {
 | 
			
		||||
            }
 | 
			
		||||
      )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log("[http response] res is: ", res);
 | 
			
		||||
          //console.log("[http response] res is: ", res);
 | 
			
		||||
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            // page 场景:
 | 
			
		||||
@@ -243,7 +243,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
    /** 处理 表格操作 */
 | 
			
		||||
    handleOperate({ type, data }) {
 | 
			
		||||
      console.log("payload", type, data);
 | 
			
		||||
      //console.log("payload", type, data);
 | 
			
		||||
      // 编辑、删除、跳转路由、打开弹窗(动态component)都可以在配置里加上 url
 | 
			
		||||
      // payload: { type: string, data: string | number | object }
 | 
			
		||||
      switch (type) {
 | 
			
		||||
@@ -299,7 +299,7 @@ export default {
 | 
			
		||||
            .catch((err) => {});
 | 
			
		||||
        }
 | 
			
		||||
        case "edit": {
 | 
			
		||||
          console.log("[edit] ", data);
 | 
			
		||||
          //console.log("[edit] ", data);
 | 
			
		||||
          this.openDialog(data); /** data is ==> id */
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@@ -322,7 +322,7 @@ export default {
 | 
			
		||||
            .then(() => {
 | 
			
		||||
              //
 | 
			
		||||
              let payload = "";
 | 
			
		||||
              console.log("copying...", type, data);
 | 
			
		||||
              //console.log("copying...", type, data);
 | 
			
		||||
              if (typeof data === "object") {
 | 
			
		||||
                const head = data.head;
 | 
			
		||||
                const copyOpt =
 | 
			
		||||
@@ -375,7 +375,7 @@ export default {
 | 
			
		||||
        case "sync": {
 | 
			
		||||
          let shouldShowOverlay = false;
 | 
			
		||||
          let payload = "";
 | 
			
		||||
          console.log("sync...", type, data);
 | 
			
		||||
          //console.log("sync...", type, data);
 | 
			
		||||
          if (typeof data === "object") {
 | 
			
		||||
            const head = data.head;
 | 
			
		||||
            const syncOpt =
 | 
			
		||||
@@ -413,7 +413,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.openDialog();
 | 
			
		||||
@@ -456,14 +456,14 @@ export default {
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
          });
 | 
			
		||||
          console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          //console.log("查询", this.cachedSearchCondition);
 | 
			
		||||
          this.getList(this.cachedSearchCondition);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
        case "同步":
 | 
			
		||||
        case "全部同步":
 | 
			
		||||
          this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
 | 
			
		||||
            console.log("同步", res);
 | 
			
		||||
            //console.log("同步", res);
 | 
			
		||||
            this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
 | 
			
		||||
            this.getList();
 | 
			
		||||
          });
 | 
			
		||||
@@ -495,7 +495,7 @@ export default {
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        //console.log(`[edit-dialog] extraParams: ${extraParams}`);
 | 
			
		||||
        this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
    // 新增 / 修改
 | 
			
		||||
 
 | 
			
		||||
@@ -117,7 +117,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
          //console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@ export default {
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
    // 导出
 | 
			
		||||
 
 | 
			
		||||
@@ -113,7 +113,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -119,7 +119,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -116,7 +116,7 @@ export default {
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
          //console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmit: debounce(function () {
 | 
			
		||||
      console.log('in role-add-or-update.vue dataformsubmit')
 | 
			
		||||
      //console.log('in role-add-or-update.vue dataformsubmit')
 | 
			
		||||
      this.$refs['dataForm'].validate((valid) => {
 | 
			
		||||
        if (!valid) {
 | 
			
		||||
          return false
 | 
			
		||||
@@ -129,7 +129,7 @@ export default {
 | 
			
		||||
        ]
 | 
			
		||||
        this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys()
 | 
			
		||||
 | 
			
		||||
        // console.log('this.dataForm', this.dataForm)
 | 
			
		||||
        // //console.log('this.dataForm', this.dataForm)
 | 
			
		||||
 | 
			
		||||
        this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
@@ -165,7 +165,7 @@ export default {
 | 
			
		||||
    //       this.addOrUpdateHandle();
 | 
			
		||||
    //       break;
 | 
			
		||||
    //     default:
 | 
			
		||||
    //       console.log(val);
 | 
			
		||||
    //       //console.log(val);
 | 
			
		||||
    //   }
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    console.log('use user-add-or-update.vue')
 | 
			
		||||
    //console.log('use user-add-or-update.vue')
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule () {
 | 
			
		||||
 
 | 
			
		||||
@@ -165,7 +165,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handleBtnClick({ btnName, payload }) {
 | 
			
		||||
      console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      //console.log("[search] form handleBtnClick", btnName, payload);
 | 
			
		||||
      switch (btnName) {
 | 
			
		||||
        case "新增":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
@@ -194,7 +194,7 @@ export default {
 | 
			
		||||
    //       this.addOrUpdateHandle();
 | 
			
		||||
    //       break;
 | 
			
		||||
    //     default:
 | 
			
		||||
    //       console.log(val);
 | 
			
		||||
    //       //console.log(val);
 | 
			
		||||
    //   }
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -209,7 +209,7 @@ export default {
 | 
			
		||||
              Cookies.set("token", res.data.token);
 | 
			
		||||
              // 刷新数据字典数据
 | 
			
		||||
              this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
 | 
			
		||||
                // console.log("[dictData] loading...", res);
 | 
			
		||||
                // //console.log("[dictData] loading...", res);
 | 
			
		||||
                if (res.code === 0 && res.data) {
 | 
			
		||||
                  let dictList = {};
 | 
			
		||||
                  res.data.map((item) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user