jinlin
2024-03-08 6d41203724ed358d0a4a356a393ab673a82c6df6
修改
3个文件已删除
6个文件已修改
1 文件已重命名
532 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamData.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamDataAssign-AddOrUpdate.vue 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamDataAssign.vue 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamDataExpect-AddOrUpdate.vue 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/SelectTyModel.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataAssignController.java
@@ -43,17 +43,15 @@
    @GetMapping("page")
    @ApiOperation("分页")
    @ApiImplicitParams({
        @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
        @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = "name", value = "名称", dataType = Constant.QT.STRING, format = "NAME^LK"),
        @ApiImplicitParam(name = "nodeType", value = "类型", dataType = Constant.QT.STRING),
        @ApiImplicitParam(name = "id", value = "上级ID", dataType = Constant.QT.STRING)
        @ApiImplicitParam(name = "srcId", value = "ID", dataType = Constant.QT.STRING)
    })
    public PageResult<ParamDataAssign> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
    public Result<List<ParamDataAssign>> page(@ApiIgnore @QueryParam QueryFilter queryFilter){
        return PageResult.ok(paramDataAssignService.page(queryFilter));
        return Result.ok(paramDataAssignService.page(queryFilter));
    }
    @PostMapping("get")
@@ -61,7 +59,7 @@
        for(ParamDataAssign assign:list){
            assign.setProductId(assign.getId());
            assign.setId(null);
            this.insert(assign);
            paramDataAssignService.insert(assign);
        }
        return Result.ok();
    }
@@ -74,14 +72,18 @@
        return Result.ok(data);
    }
    @PostMapping
    @ApiOperation("新增")
    @LogOperation("新增")
    public Result insert(@RequestBody ParamDataAssign paramDataAssign){
    @PostMapping("save")
    public Result save(@RequestBody ParamDataAssign paramDataAssign) {
        //效验数据
        ValidatorUtils.validateEntity(paramDataAssign, AddGroup.class, DefaultGroup.class);
        paramDataAssignService.insert(paramDataAssign);
        for (ParamDataAssign assign : paramDataAssign.getDataThreeList()) {
            if (assign.getId()!=null){
                ValidatorUtils.validateEntity(assign, UpdateGroup.class, DefaultGroup.class);
                paramDataAssignService.update(assign);
            }else{
                ValidatorUtils.validateEntity(assign, AddGroup.class, DefaultGroup.class);
                paramDataAssignService.insert(assign);
            }
        }
        return Result.ok();
    }
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/ParamDataExpectController.java
@@ -43,16 +43,14 @@
    @GetMapping("page")
    @ApiOperation("分页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT),
            @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT),
            @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING),
            @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING),
            @ApiImplicitParam(name = "name", value = "名称", dataType = Constant.QT.STRING, format = "NAME^LK"),
            @ApiImplicitParam(name = "nodeType", value = "类型", dataType = Constant.QT.STRING),
            @ApiImplicitParam(name = "srcId", value = "上级ID", dataType = Constant.QT.STRING)})
    public PageResult<ParamDataExpect> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
    public Result<List<ParamDataExpect>> page(@ApiIgnore @QueryParam QueryFilter queryFilter) {
        return PageResult.ok(paramDataExpectService.page(queryFilter));
        return Result.ok(paramDataExpectService.page(queryFilter));
    }
    @PostMapping("get")
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataAssign.java
@@ -9,6 +9,7 @@
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
 * param_data_assign
@@ -99,4 +100,7 @@
    @TableField(exist = false)
    private Long productIdInit;
    @TableField(exist = false)
    private List<ParamDataAssign> dataThreeList;
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ParamDataExpect.java
@@ -101,7 +101,6 @@
    @TableField(exist = false)
    private Long productIdInit;
    @lombok.Getter
    @TableField(exist = false)
    private List<ParamDataExpect> dataThreeList;
modules/mainPart/src/main/resources/mapper/basicInfo/ParamDataAssignDao.xml
@@ -16,10 +16,10 @@
        LEFT JOIN param_data_assign b ON b.product_id = a.id
        <where>
            a.is_delete = 0
            <if test="id!=null">
                and a.pid =${id}
            <if test="srcId!=null">
                and a.pid =${srcId}
            </if>
            <if test="id==null">
            <if test="srcId==null">
                and a.pid is null
            </if>
            <if test="whereSql!=null">
web/src/views/modules/basicInfo/ParamData.vue
File was renamed from web/src/views/modules/basicInfo/ParamDataExpect.vue
@@ -8,10 +8,11 @@
      </el-col>
      <el-col :span="19">
        <div class="mod-basicInfo-paramDataExpect}">
          <zt-table-wraper ref="tableObj" query-url="/basicInfo/ParamDataExpect/page"
                           delete-url="/basicInfo/ParamDataExpect/"
          <zt-table-wraper ref="tableObj" :query-url=queryUrl
                           :delete-url=deleteUrl
                           @dataLoaded="dataLoaded"
                           v-slot="{ table }">
                           v-slot="{ table }"
                           :paging='false'>
            <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()">
              <el-form-item>
                <el-input v-model="dataForm.name" placeholder="请输入名称" clearable></el-input>
@@ -60,7 +61,8 @@
                                 :value="item.value">
                      </el-option>
                    </el-select>
                    <zt-dict-tag dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI" :typeD="typeD"
                    <zt-dict-tag v-else dict="is_or_not" :value="row.joinCompute" :typeS="typeS" :typeI="typeI"
                                 :typeD="typeD"
                                 :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
                  </template>
                </el-table-column>
@@ -165,7 +167,8 @@
                                 :value="item.value">
                      </el-option>
                    </el-select>
                    <zt-dict-tag dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI" :typeD="typeD"
                    <zt-dict-tag v-else dict="is_or_not" :value="row.repairable" :typeS="typeS" :typeI="typeI"
                                 :typeD="typeD"
                                 :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
                  </template>
                </el-table-column>
@@ -180,7 +183,8 @@
                                 :value="item.value">
                      </el-option>
                    </el-select>
                    <zt-dict-tag dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS" :typeI="typeI"
                    <zt-dict-tag v-else dict="RepairDistribType" :value="row.repairDistribType" :typeS="typeS"
                                 :typeI="typeI"
                                 :typeD="typeD" :typeColor="typeColor" :size="size" :effect="effect" :hit="hit"/>
                  </template>
                </el-table-column>
@@ -200,7 +204,8 @@
              <!--  <zt-table-column-dict v-if="dataForm.nodeType==='2'" :key="27" prop="reliabDistribType" label="可靠性分布类型"
                                      width="160"/>-->
              <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="可靠性分布类型" :key="27" width="160">
              <el-table-column v-if="dataForm.nodeType==='2'" prop="reliabDistribType" label="可靠性分布类型" :key="27"
                               width="160">
                <template v-slot="{ row }">
                  <el-select v-if="row.isEdit" v-model="row.reliabDistribType"
                             placeholder="当前状态">
@@ -232,7 +237,6 @@
            </el-table>
            <!-- 弹窗, 新增 / 修改 -->
            <add-or-update ref="AddOrUpdate" @refreshDataList="table.query"/>
            <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
          </zt-table-wraper>
        </div>
@@ -242,13 +246,15 @@
</template>
<script>
  import AddOrUpdate from './ParamDataExpect-AddOrUpdate'
  import ProductModelTree from "./ProductModelTree";
  import SelectTyModel from "./SelectTyModel";
  export default {
    data() {
      return {
        queryUrl: '/basicInfo/ParamDataExpect/page',
        deleteUrl: '/basicInfo/ParamDataExpect',
        pageCode: '',
        key: '',
        typeS: '',
        typeI: '',
@@ -259,6 +265,7 @@
        effect: '',
        hit: false,
        dataForm: {
          pageCode: this.$route.query.pageCode,
          id: '',
          pid: '',
          srcId: '',
@@ -298,23 +305,36 @@
      }
    },
    components: {
      AddOrUpdate,
      ProductModelTree,
      SelectTyModel
    },
    mounted() {
      this.pageCode = this.$route.query.pageCode
      this.dataForm.pageCode = this.$route.query.pageCode
      if (this.pageCode === 'assign') {
        this.queryUrl = '/basicInfo/ParamDataAssign/page'
        this.deleteUrl = '/basicInfo/ParamDataAssign'
      }
      console.log(this.pageCode, 'this.pageCode this.pageCode')
    },
    methods: {
      add() {
        this.$refs.SelectTyModel.$refs.dialog.init(null, {
          type: this.dataForm.nodeType - 1,
          id: this.dataForm.id,
          data: 'expect'
          pageCode: this.pageCode
        })
      },
      //批量保存
      async handleSaveRows() {
        this.dataForm.dataThreeList = this.$refs.tableObj.dataList
        console.log(this.dataForm, 'this.dataForm this.dataForm')
        let res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm)
        let res
        if (this.pageCode === 'Expect') {
          res = await this.$http.post('/basicInfo/ParamDataExpect/save', this.dataForm)
        } else {
          res = await this.$http.post('/basicInfo/ParamDataAssign/save', this.dataForm)
        }
        if (res.success) {
          console.log(res.data)
          await this.$tip.success()
@@ -351,14 +371,6 @@
      //   })
      //   console.log(this.editingCell, 'this.editingCell')
      // },
      update(row) {
        console.log(row, 'update')
        this.$refs.AddOrUpdate.$refs.dialog.init(row.id, {
          type: this.dataForm.nodeType,
          name: row.name,
          productId: row.productId
        })
      },
      onProductSelected(data) {
        this.dataForm.srcId = data.id
        this.dataForm.nodeType = data.nodeType
web/src/views/modules/basicInfo/ParamDataAssign-AddOrUpdate.vue
File was deleted
web/src/views/modules/basicInfo/ParamDataAssign.vue
File was deleted
web/src/views/modules/basicInfo/ParamDataExpect-AddOrUpdate.vue
File was deleted
web/src/views/modules/basicInfo/SelectTyModel.vue
@@ -45,8 +45,8 @@
      init(id,params) {
        this.dataForm.nodeType = params.type
        this.dataForm.pid = params.id
        this.data = params.data
        if (this.data ==='expect'||this.data==='assign'){
        this.pageCode = params.pageCode
        if (this.pageCode ==='expect'||this.pageCode==='assign'){
          this.url='/basicInfo/XhProductModel/page'
        }
        console.log(this.dataForm.pid, 'init()')
@@ -62,9 +62,9 @@
      },
      async formSubmit() {
        let res
        if (this.data && this.data === 'expect'){
        if (this.pageCode && this.pageCode === 'expect'){
          res = await this.$http.post('/basicInfo/ParamDataExpect/get', this.selectList)
        }else if(this.data && this.data === 'assign') {
        }else if(this.pageCode && this.pageCode === 'assign') {
            res = await this.$http.post('/basicInfo/ParamDataAssign/get', this.selectList)
        }else
        {