田源
2023-08-05 d87726d60385c1f3c635d93d43340fa83cb55f27
模板流程表单保存失败关闭禁用功能重新提交
已修改2个文件
85 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/FlowPath.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -26,7 +26,7 @@
        <!--        树节点添加对话框-->
        <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible"  v-loading="AddLoading" append-to-body
                   style="width: 1700px;margin: auto">
          <el-form :model="TreeAddform" :rules="rules">
          <el-form ref="myForm" :model="TreeAddform" :rules="rules">
            <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id">
              <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
            </el-form-item>
@@ -1041,34 +1041,40 @@
    //树节点取消事件
    TreeEscHandler(){
      this.TreeAddform={};
      this.TreeAddFormVisible=false
      this.TreeAddFormVisible=false;
      // 关闭弹窗清空校验
      this.$refs.myForm.clearValidate();
    },
    //树节点添加事件
    TreeAddHandler() {
      const data = this.TreeAddform;
      // data.btmtypename= this.TreeList.btmtypename
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
      TreeSave(data)
        .then(() => {
          this.$message({
            type: "success",
            message: "添加成功!",
      if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) {
        this.$message.warning('请输入内容!');
      }else {
        const data = this.TreeAddform;
        // data.btmtypename= this.TreeList.btmtypename
        this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
        TreeSave(data)
          .then(() => {
            this.$message({
              type: "success",
              message: "添加成功!",
            });
            Object.keys(this.TreeAddform).forEach(key => {
              this.TreeAddform[key] = "";
            });
            this.getAttr();
            this.TreeAddFormVisible = false;
            //添加完成后右侧清空
            this.ProData=[];
            this.Formlist=[];
          })
          .catch((res) => {
            this.$message({
              type: "warning",
              message: res,
            });
          });
          Object.keys(this.TreeAddform).forEach(key => {
            this.TreeAddform[key] = "";
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          //添加完成后右侧清空
          this.ProData=[];
          this.Formlist=[];
        })
        .catch((res) => {
          this.$message({
            type: "warning",
            message: res,
          });
        });
      }
    },
    //树节点删除按钮
    TreeDel() {
Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -171,17 +171,19 @@
        // 新增
        async handleSave(row, done, loading) {
            console.log(row)
            const response = await flowpathSave({ ...row, ...{ templateId: this.code } })
            if (response.status === 200) {
                loading()
            await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{
              if (response.status === 200) {
                console.log(response)
                this.$message({
                    type: 'success',
                    message: '新增数据成功!'
                  type: 'success',
                  message: '新增数据成功!'
                })
                done()
                this.getDataList()
            }
              }
            }).catch(res=>{
              loading()
            })
        },
        // 编辑
@@ -189,16 +191,19 @@
            console.log(row)
            const { modelName, modelKey, buttonTypeKey, id ,description} = row
            let param = { modelName, modelKey, buttonTypeKey, id,description }
            const response = await flowpathSave({ ...param, ...{ templateId: this.code } })
            if (response.status === 200) {
                loading()
            await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{
              if (response.status === 200) {
                this.$message({
                    type: 'success',
                    message: '修改数据成功!'
                  type: 'success',
                  message: '修改数据成功!'
                })
                done()
                this.getDataList()
            }
              }
            }).catch(()=>{
              //loading控制禁用 默认是开启
              loading()
            })
        },
        // 删除单条