| | |
| | | public Result insert(@RequestBody TyProductModel tyProductModel){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(tyProductModel, AddGroup.class, DefaultGroup.class); |
| | | Integer no = tyProductModelService.getNo(tyProductModel.getPid()); |
| | | Integer no = tyProductModelService.getNo(tyProductModel.getPid(),tyProductModel.getNodeType()); |
| | | tyProductModel.setSort(no + 1); |
| | | tyProductModelService.insert(tyProductModel); |
| | | |
| | |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class); |
| | | |
| | | Integer no = xhProductModelService.getNo(xhProductModel.getPid()); |
| | | Integer no = xhProductModelService.getNo(xhProductModel.getPid(),xhProductModel.getProductType()); |
| | | if (xhProductModel.getSort() < no) { |
| | | xhProductModel.setSort(no + 1); |
| | | } |
| | |
| | | |
| | | List<TyProductModel> getProductList(); |
| | | |
| | | Integer getNo(Long pid); |
| | | Integer getNo(Long pid,String nodeType); |
| | | } |
| | |
| | | List<XhProductModel> getList(Map<String, Object> params); |
| | | |
| | | |
| | | Integer getNo(Long pid); |
| | | Integer getNo(Long pid, String productType); |
| | | |
| | | List<XhProductModel> getProductList(); |
| | | |
| | |
| | | |
| | | public List<TyProductModel> getAllTree() { |
| | | List<TyProductModel> productList = baseDao.selectList(new QueryWrapper<TyProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).orderByAsc(Constant.TableColumn.SORT)); |
| | | Constant.Bool.NO).orderByAsc("node_type").orderByAsc(Constant.TableColumn.SORT)); |
| | | return TreeUtils.build(productList); |
| | | } |
| | | |
| | | public Integer getNo(Long pid) { |
| | | if (baseDao.getNo(pid) == null){ |
| | | public Integer getNo(Long pid, String nodeType) { |
| | | if (baseDao.getNo(pid,nodeType) == null){ |
| | | return 0; |
| | | } |
| | | return baseDao.getNo(pid); |
| | | return baseDao.getNo(pid,nodeType); |
| | | } |
| | | } |
| | |
| | | return TreeUtils.build(productList); |
| | | } |
| | | |
| | | public Integer getNo(Long pid) { |
| | | if (baseDao.getNo(pid) == null) { |
| | | public Integer getNo(Long pid, String productType) { |
| | | if (baseDao.getNo(pid, productType) == null) { |
| | | return 0; |
| | | } |
| | | return baseDao.getNo(pid); |
| | | return baseDao.getNo(pid,productType); |
| | | } |
| | | |
| | | public List<XhProductModel> getProductList() { |
| | |
| | | @TableField(exist = false) |
| | | private String name; |
| | | |
| | | @TableField(exist = false) |
| | | private Double phaseDuration; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private Long productId; |
| | | |
| | | @TableField(exist = false) |
| | | private Double operatConditDuration; |
| | | } |
| | |
| | | END AS productIdInit |
| | | FROM |
| | | product_model a |
| | | LEFT JOIN param_data b ON b.product_id = a.id and b.page_code = '${pageCode}' |
| | | LEFT JOIN param_data b ON b.product_id = a.id and b.page_code = '${pageCode}' and b.is_delete = 0 |
| | | <where> |
| | | a.is_delete = 0 |
| | | and a.product_type <> 10 |
| | | <if test="srcId!=null"> |
| | | and a.pid =${srcId} |
| | | </if> |
| | |
| | | and ${whereSql} |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | ORDER BY |
| | | a.product_type,a.sort |
| | | </select> |
| | | <select id="getParamData" resultType="com.zt.life.modules.mainPart.basicInfo.model.ParamData"> |
| | | SELECT |
| | | a.* |
| | | FROM |
| | | param_data a |
| | | WHERE |
| | | a.is_delete = 0 |
| | | and a.product_id=#{productId} |
| | | and a.page_code=#{pageCode} |
| | | SELECT a.* |
| | | FROM param_data a |
| | | WHERE a.is_delete = 0 |
| | | and a.product_id = #{productId} |
| | | and a.page_code = #{pageCode} |
| | | limit 1 |
| | | </select> |
| | | |
| | |
| | | <mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel"> |
| | | select a.* |
| | | from product_model_common a |
| | | where a.is_delete = 0 |
| | | and a.pid in (select src_id from product_model where id = ${pid}) |
| | | and ((a.node_type = 1) or (a.node_type <> 1 and id not in (select src_id from product_model where pid = ${pid}))) |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | select * |
| | | from product_model_common |
| | | where is_delete = 0 |
| | | AND ( |
| | | -- 如果子查询返回结果为空,则检查a.pid是否为空 |
| | | (SELECT src_id FROM product_model WHERE id = ${pid} AND is_delete = 0) IS NULL |
| | | AND pid IS NULL |
| | | OR |
| | | -- 否则,检查a.pid是否在子查询结果中 |
| | | pid IN ( |
| | | SELECT src_id |
| | | FROM product_model |
| | | WHERE id = ${pid} |
| | | AND is_delete = 0 |
| | | ) |
| | | ) |
| | | and ((node_type = 1) or (node_type <> 1 and id not in (select src_id from product_model where pid = |
| | | ${pid} and is_delete=0))) |
| | | ORDER BY |
| | | node_type,sort |
| | | </select> |
| | | <select id="getProductList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel"> |
| | | select a.name, a.id |
| | | from product_model_common a |
| | | where a.is_delete = 0 |
| | | and a.node_type != 1 |
| | | and a.node_type <> 1 |
| | | </select> |
| | | <select id="getNo" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) |
| | |
| | | <if test="pid==null"> |
| | | and pid is null |
| | | </if> |
| | | and node_type =${nodeType} |
| | | </where> |
| | | Group by node_type |
| | | </select> |
| | |
| | | <mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel"> |
| | | select a.* |
| | | from product_model a |
| | | select * |
| | | from product_model |
| | | <where> |
| | | a.is_delete = 0 |
| | | is_delete = 0 |
| | | <if test="pid!=null"> |
| | | and pid =${pid} |
| | | </if> |
| | |
| | | and ${whereSql} |
| | | </if> |
| | | </where> |
| | | ORDER BY sort |
| | | ORDER BY |
| | | product_type,sort |
| | | </select> |
| | | <select id="getNo" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) |
| | |
| | | <if test="pid==null"> |
| | | and pid is null |
| | | </if> |
| | | and product_type =${productType} |
| | | </where> |
| | | Group by product_type |
| | | </select> |
| | |
| | | <mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.Task"> |
| | | select a.* |
| | | from task a |
| | | select a.*, |
| | | b.phaseDuration |
| | | FROM |
| | | task a |
| | | LEFT JOIN (select task_id , SUM(phase_duration_rate) as phaseDuration from task_phase |
| | | where is_delete =0 group by task_id) b ON a.id = b.task_id |
| | | <where> |
| | | a.is_delete = 0 |
| | | and a.product_id=${productId} |
| | |
| | | <mapper namespace="com.zt.life.modules.mainPart.taskReliability.dao.TaskPhaseDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.taskReliability.model.TaskPhase"> |
| | | select a.* |
| | | from task_phase a |
| | | SELECT |
| | | a.*, |
| | | b.operatConditDuration |
| | | FROM |
| | | task_phase a |
| | | LEFT JOIN (select phase_id , SUM(operat_condit_duration_rate) as operatConditDuration from task_phase_model |
| | | where is_delete =0 group by phase_id) b ON a.id = b.phase_id |
| | | <where> |
| | | a.is_delete = 0 |
| | | and a.task_id=${taskId} |
| | |
| | | .zt .el-table th.is-center { |
| | | text-align: center; |
| | | } |
| | | .zt .el-table td.is-left, |
| | | .zt .el-table th.is-left { |
| | | text-align: left; |
| | | } |
| | | .zt .el-table td.is-right, |
| | | .zt .el-table th.is-right { |
| | | text-align: right; |
| | |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" border row-key="id" |
| | | class="myTable" |
| | | :cell-style="cellStyle" |
| | | v-adaptive="{bottomOffset:30}" |
| | | height="100px" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | |
| | | AddOrUpdate |
| | | }, |
| | | methods: { |
| | | cellStyle({column}) { |
| | | if (column.label === '名称') { |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | isNotPlatform(row) { |
| | | return true; |
| | | return !this.$equalsIgnoreType(row.type, this.$dict.MenuType.PLATFORM)// 平台不允许修改删除 |
| | |
| | | /*text-align: left !important;*/ |
| | | /*}*/ |
| | | /* tree table第一列居中 */ |
| | | .zt .el-table tbody tr[class*="el-table__row--level-"] td:first-child { |
| | | /*.zt .el-table tbody tr[class*="el-table__row--level-"] td:first-child { |
| | | text-align: center; |
| | | } |
| | | }*/ |
| | | /* 表格选中颜色 */ |
| | | .zt .el-table__body tr.current-row>td { |
| | | background-color: #bce4e1; |
| | |
| | | <zt-dict v-model="dataForm.repairDistribType" dict="RepairDistribType" placeholder="请选择维修分布类型" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="warning" @click="handleSaveRows">保存</zt-button> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button v-if="dataForm.srcId" type="warning" @click="handleSaveRows">保存</zt-button> |
| | | <zt-button v-if="dataForm.srcId" type="query" @click="table.query()"/> |
| | | <zt-button type="add" v-if="dataForm.productType==='3'" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.srcId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | | class="paramsDataTable" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" :key="1" width="40" align="center"/> |
| | | <el-table-column prop="name" :key="2" label="名称" fixed="left"/> |
| | | <el-table-column prop="name" :key="2" label="名称" fixed="left" width="140"/> |
| | | <el-table-column v-if="dataForm.productType==='4'" :key="3" prop="baseOperatRatio" label="基本可靠性运行比"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.baseOperatRatio"></el-input> |
| | |
| | | <span v-else v-text="scope.row.actualRunTime"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'" :key="5" label="基本可靠性计算"> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="5" label="基本可靠性计算"> |
| | | <!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="参加计算" width="100" dict="is_or_not"/>--> |
| | | <el-table-column prop="basicJoinCompute" label="参加计算" :key="6" width="100"> |
| | | <template v-slot="{ row }"> |
| | |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <el-table-column v-if="dataForm.productType==='3'" :key="15" label="任务可靠性计算"> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="15" label="任务可靠性计算"> |
| | | <el-table-column prop="taskMtbcfRegulate" :key="16" label="规定MTBCF" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfRegulate"></el-input> |
| | |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | <el-table-column v-if="dataForm.productType==='3'" :key="22" label="维修分布"> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="22" label="维修分布"> |
| | | <!-- <zt-table-column-dict prop="repairable" :keys="23" label="可维修" dict="is_or_not"/>--> |
| | | <el-table-column prop="repairable" label="可维修" :key="23"> |
| | | <template v-slot="{ row }"> |
| | |
| | | |
| | | <!-- <zt-table-column-dict v-if="dataForm.productType==='3'" :key="27" prop="reliabDistribType" label="可靠性分布类型" |
| | | width="160"/>--> |
| | | <el-table-column v-if="dataForm.productType==='3'" prop="reliabDistribType" label="可靠性分布类型" :key="27" |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" prop="reliabDistribType" label="可靠性分布类型" :key="27" |
| | | width="160"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.reliabDistribType" |
| | |
| | | :hit="hit"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.productType==='3'" :key="28" prop="runTime" label="运行时间" width="100"> |
| | | <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='2'" :key="28" prop="runTime" label="运行时间" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.isEdit" v-model="scope.row.runTime"></el-input> |
| | | <span v-else v-text="scope.row.runTime"></span> |
| | |
| | | filterNode(value, data) { |
| | | if (!value) return true |
| | | return data.name.indexOf(value) !== -1 |
| | | } |
| | | , |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.$emit('on-selected', data) |
| | | } |
| | |
| | | <zt-dialog ref="dialog" @confirm="formSubmit" append-to-body> |
| | | <el-form :model="dataForm" ref="dataForm" :disabled="dataForm.disabled" label-width="120px"> |
| | | <zt-form-item label="上级系统" prop="pid"> |
| | | <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList"/> |
| | | <zt-select v-model="dataForm.pid" placeholder=" " :datas="productList" @input="selectDefaultProduct"/> |
| | | </zt-form-item> |
| | | <zt-form-item label="名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | |
| | | init() { |
| | | this.getProductList() |
| | | }, |
| | | selectDefaultProduct() { |
| | | this.dataForm.nodeType = 1 |
| | | }, |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/TyProductModel/getProductList') |
| | |
| | | let params = { |
| | | productType: selected |
| | | } |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params}) |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params}) |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | }, |
| | |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.map, 'getInfo') |
| | | if (this.dataForm.pid == null) { |
| | | this.dataForm.pid = '' |
| | | } |
| | | if (this.dataForm.baseCompute == null) { |
| | | this.dataForm.baseCompute = '' |
| | | } |
| | | if (this.dataForm.taskCompute == null) { |
| | | this.dataForm.taskCompute = '' |
| | | } |
| | | if (this.dataForm.reliabDistrib == null) { |
| | | this.dataForm.reliabDistrib = '' |
| | | } |
| | | if (this.dataForm.repairDistrib == null) { |
| | | this.dataForm.repairDistrib = '' |
| | | } |
| | | console.log(this.dataForm, 'this.dataForm') |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | |
| | | name: '', |
| | | productType: '', |
| | | operatImg: '', |
| | | operatImgName:'', |
| | | operatImgName: '', |
| | | sort: '', |
| | | status: '' |
| | | } |
| | |
| | | PictureSelect |
| | | }, |
| | | methods: { |
| | | init(id,params) { |
| | | init(id, params) { |
| | | if (params.type === 'tree') { |
| | | this.isTree = true |
| | | this.isShow = false |
| | |
| | | this.dataForm.pid = params.pid |
| | | this.dataForm.productType = params.type |
| | | } |
| | | if (this.dataForm.productType==='10'){ |
| | | |
| | | } |
| | | }, |
| | | |
| | | // 获取系统列表 |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getProductList') |
| | |
| | | let params = { |
| | | productType: selected |
| | | } |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params:params}) |
| | | let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params}) |
| | | this.dataForm.operatImgName = res.data.name |
| | | this.dataForm.operatImg = res.data.id |
| | | }, |
| | |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let flag = true |
| | | if (this.isTree){ |
| | | if (this.dataForm.productType !== '5' || this.dataForm.productType !== '4') { |
| | | this.$alert("不支持新增此节点") |
| | | flag =false |
| | | } |
| | | }else{ |
| | | if (this.dataForm.productType === '5' || this.dataForm.productType === '4') { |
| | | this.$alert("不支持新增此节点") |
| | | flag =false |
| | | } |
| | | } |
| | | |
| | | if (!flag){ |
| | | return |
| | | } |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/basicInfo/XhProductModel/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | |
| | | <el-row :gutter="5"> |
| | | <el-col :span="5"> |
| | | <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)"> |
| | | <product-model-tree @on-selected="onProductSelected" showXdy="true"/> |
| | | <product-model-tree @on-selected="onProductSelected" showXdy="true" ref="ProductModelTree"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="19"> |
| | |
| | | <el-input v-model="dataForm.name" placeholder="请输入名称" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button v-if="productType && productType!=='10'" type="query" @click="table.query()"/> |
| | | <zt-button v-if="productType && productType!=='10'" type="add" @click="add()"/> |
| | | <zt-button v-if="productType==='3'" type="primary" @click="addCell()">新增虚单元</zt-button> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="productType && productType!=='10'" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | |
| | | <zt-table-column-handle :table="table" width="150px"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/> |
| | | <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/> |
| | | <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> |
| | | <select-ty-model @refreshDataList="refreshData" ref="SelectTyModel"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-col> |
| | |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | refreshData(){ |
| | | this.$refs.tableObj.query() |
| | | this.$refs.ProductModelTree.getProductList() |
| | | }, |
| | | onProductSelected(data) { |
| | | console.log(data) |
| | | this.dataForm.pid = data.id |
| | | this.dataForm.type = data.productType |
| | | this.productType = data.productType |
| | | this.$refs.tableObj.query() |
| | | if(data.productType!=='10'){ |
| | | this.$refs.tableObj.query() |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <zt-form-item label="检索关键字" prop="contentType"> |
| | | <el-input v-model="dataForm.contentType"></el-input> |
| | | </zt-form-item> |
| | | <div class="el-flex img-src" style="height: 20px"> |
| | | <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> |
| | | <!--<config-uploader :lineHeight="true" busi-type="sys_picture" model-name="dataForm" :dataForm="dataForm" |
| | | v-model="dataForm.files"/>--> |
| | | <zt-form-item> |
| | | <el-upload :limit="1" :http-request="httpRequest" :before-upload="beforeUpload" :on-exceed="handleExceed"> |
| | | <el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
| | | </el-upload> |
| | | <el-image v-if="dataForm.id" :src="url+dataForm.id" style="height: 50px;width: 50px"></el-image> |
| | | </el-form-item> |
| | | </div> |
| | | </zt-form-item> |
| | | </el-form> |
| | | </zt-dialog> |
| | | </template> |
| | |
| | | margin-top: 10px !important; |
| | | margin-bottom: 0 !important; |
| | | } |
| | | /*.zt .el-dialog .el-dialog__body .el-form { |
| | | min-height: 310px !important; |
| | | }*/ |
| | | </style> |
| | |
| | | <el-input v-model="dataForm.modelTag" placeholder="请输入模型标识" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.productId" type="query" @click="table.query()"/> |
| | | <zt-button v-if="dataForm.productId" type="add" @click="add()"/> |
| | | <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="modelName" label="模型名称"/> |
| | | <el-table-column prop="modelTag" label="模型标识"/> |
| | | <el-table-column prop="quoteNum" label="被引用数"/> |
| | | <el-table-column prop="quoteNum" label="被引用数" align="center"/> |
| | | <el-table-column prop="modelState" label="模型状态" align="center"/> |
| | | <el-table-column prop="modelDataState" label="模型数据状态" align="center"/> |
| | | <el-table-column prop="remark" label="备注"/> |
| | |
| | | <el-col :span="14"> |
| | | <div class="mod-taskReliability-operatCondit}"> |
| | | <div class="fa-card-a"> |
| | | <div> |
| | | 产品节点: |
| | | <zt-select v-model="dataForm.productId" :datas="productList" @change="onProductSelected"/> |
| | | <div style="margin-top: 10px"> |
| | | <zt-select v-model="dataForm.productId" placeholder="请选择产品节点" :datas="productList" @change="onProductSelected"/> |
| | | </div> |
| | | <zt-table-wraper ref="tableObj" query-url="/taskReliability/OperatCondit/page" defaultNotQuery="true" delete-url="/taskReliability/OperatCondit" |
| | | v-slot="{ table }" :paging='false'> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.productId" type="query" @click="table.query()"/> |
| | | <zt-button v-if="dataForm.productId" type="add" @click="add()"/> |
| | | <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" |
| | |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null,{productId: this.dataForm.productId}) |
| | | }, |
| | | onProductSelected(data) { |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.productId = data.id |
| | | this.$refs.tableObj.query() |
| | | }, |
| | |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" |
| | | v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle" |
| | | row-key="id" |
| | | :cell-style="cellStyle" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :default-expand-all="true"> |
| | | <el-table-column prop="product" label="产品节点" width="160"/> |
| | | <el-table-column prop="product" label="产品节点1" width="160"/> |
| | | <el-table-column prop="modelName" label="产品模型"/> |
| | | <zt-table-column-handle :table="table" edit-perm="taskReliability:update" |
| | | delete-perm="taskReliability::delete" :has-view="false"> |
| | |
| | | this.dataForm.operatConditId = param.row.id |
| | | this.dataForm.productId = param.productId |
| | | this.$refs.tableObj.query() |
| | | }, |
| | | cellStyle({column}) { |
| | | if (column.label === '系统') { |
| | | return 'text-align: left !important;' |
| | | } |
| | | }, |
| | | openSelectModel(row) { |
| | | console.log(row, 'selectModel'); |
| | |
| | | <zt-form-item label="任务名称" prop="taskName" rules="required"> |
| | | <el-input v-model="dataForm.taskName"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="任务顺序" prop="taskSort" rules="required"> |
| | | <!-- <zt-form-item label="任务顺序" prop="taskSort" rules="required"> |
| | | <el-input v-model="dataForm.taskSort"></el-input> |
| | | </zt-form-item> |
| | | </zt-form-item>--> |
| | | </el-form> |
| | | </zt-dialog> |
| | | </template> |
| | |
| | | v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="add" @click="add()" /> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.productId" type="add" @click="add()" /> |
| | | <zt-button v-if="dataForm.productId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="taskName" label="任务名称"/> |
| | | <el-table-column prop="taskSort" label="任务顺序"/> |
| | | <!--<el-table-column prop="taskSort" label="任务顺序" align="center"/>--> |
| | | <el-table-column prop="phaseDuration" label="任务时长分配" align="right"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete"/> |
| | | </el-table> |
| | |
| | | return { |
| | | productList: [], |
| | | dataForm: { |
| | | id:'', |
| | | productId: '' |
| | | } |
| | | } |
| | |
| | | <zt-form-item label="阶段时速" prop="phaseSpeed"> |
| | | <el-input v-model="dataForm.phaseSpeed"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="阶段顺序" prop="phaseSort"> |
| | | <!-- <zt-form-item label="阶段顺序" prop="phaseSort"> |
| | | <el-input v-model="dataForm.phaseSort"></el-input> |
| | | </zt-form-item> |
| | | </zt-form-item>--> |
| | | <zt-form-item label="备注" prop="remark"> |
| | | <el-input v-model="dataForm.remark"></el-input> |
| | | </zt-form-item> |
| | |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | console.log(this.time,'dataLoaded') |
| | | if (this.time + Number(this.dataForm.phaseDurationRate > 1)) { |
| | | if (this.time + Number(this.dataForm.phaseDurationRate )> 1) { |
| | | this.$alert("请重新设置当前时长比分配") |
| | | }else{ |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/taskReliability/TaskPhase/', this.dataForm) |
| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="5"> |
| | | <el-col :span="6"> |
| | | <el-col :span="7"> |
| | | <div class="fa-card-a" style="margin-right: 5px;"> |
| | | <task @onTaskSelected="onTaskSelected"/> |
| | | <task @onTaskSelected="onTaskSelected" ref="task"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | |
| | | :paging='false' v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="add" @click="add()"/> |
| | | <zt-button type="delete" @click="table.deleteHandle()"/> |
| | | <zt-button v-if="dataForm.taskId" type="add" @click="add()"/> |
| | | <zt-button v-if="dataForm.taskId" type="delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" |
| | | |
| | | @row-click="selectPhase" @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40" align="center"/> |
| | | <el-table-column prop="phaseName" label="任务阶段名称"/> |
| | | <el-table-column prop="phaseDurationRate" label="阶段时长比"/> |
| | | <el-table-column prop="phaseSpeed" label="阶段时速"/> |
| | | <el-table-column prop="phaseSort" label="阶段顺序"/> |
| | | <el-table-column prop="phaseName" label="阶段名称" align="center"/> |
| | | <el-table-column prop="phaseDurationRate" label="阶段时长比" align="right"/> |
| | | <el-table-column prop="phaseSpeed" label="阶段时速" align="right"/> |
| | | <!--<el-table-column prop="phaseSort" label="阶段顺序" align="center"/>--> |
| | | <el-table-column prop="operatConditDuration" label="工况时长分配" align="center"/> |
| | | <zt-table-column-handle :table="table" |
| | | delete-perm="taskReliability::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/> |
| | | <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <task-phase-model ref="model"/> |
| | | <el-col :span="6"> |
| | | <task-phase-model @getList="refreshData" ref="model"/> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id:'', |
| | | taskId: '', |
| | | productId: '' |
| | | }, |
| | |
| | | AddOrUpdate |
| | | }, |
| | | methods: { |
| | | refreshData(){ |
| | | this.$refs.tableObj.query() |
| | | this.$refs.task.$refs.tableObj.query() |
| | | }, |
| | | dataLoaded(data) { |
| | | this.time = null |
| | | this.dataList = data |
| | | for (let i = 0; i < this.dataList.length; i++) { |
| | | this.time = this.time + Number(this.dataList[i].phaseDurationRate) |
| | | } |
| | | console.log( this.time,'dataLoaded') |
| | | if (this.time>1){ |
| | | this.$alert("当前运行时长比已超出,请重新设置") |
| | | } |
| | |
| | | delete-url="/taskReliability/TaskPhaseModel/" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-button type="warning" @click="handleSaveRows">保存</zt-button> |
| | | <zt-button v-if="dataForm.phaseId" type="warning" @click="handleSaveRows">保存</zt-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" |
| | |
| | | @cell-click="handleCellClick" |
| | | @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="operatConditName" label="工况名称" width="160"/> |
| | | <el-table-column prop="operatConditDurationRate" label="工况时长比"> |
| | | <el-table-column prop="operatConditDurationRate" label="时长比" align="right" width="100"> |
| | | <template slot-scope="scope"> |
| | | <span |
| | | v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> |
| | |
| | | } |
| | | this.dataForm.dataThreeList = list |
| | | console.log(time, 'async handleSaveRows') |
| | | if (time!== 1) { |
| | | if (time> 1) { |
| | | this.$alert("请重新设置当前时长比分配") |
| | | return |
| | | } |
| | |
| | | this.originalData = null |
| | | this.dataForm.dataThreeList = null |
| | | this.$refs.tableObj.query() |
| | | this.$emit('getList') |
| | | this.originalTableData = JSON.parse(JSON.stringify(this.dataList)); // 更新初始数据为当前数据 |
| | | console.log(this.originalTableData, 'this.originalTableData 当前表格json数据') |
| | | } |