modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/public/产品结构树导入模板.xlsx | 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/baseReliability/ParamDataBasic.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/basicInfo/ParamData.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/basicInfo/ProductModelTree.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/basicInfo/XhProductModel.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/taskReliability/ModelRbd.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
web/src/views/modules/taskReliability/OperatCondit.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
modules/mainPart/src/main/resources/mapper/basicInfo/TyProductModelDao.xml
@@ -4,34 +4,29 @@ <mapper namespace="com.zt.life.modules.mainPart.basicInfo.dao.TyProductModelDao"> <select id="getList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TyProductModel"> select * from product_model_common where is_delete = 0 SELECT PMC.* FROM product_model_common PMC JOIN (SELECT product_type, src_id FROM product_model WHERE id = ${pid} AND is_delete = 0) AS PM ON TRUE WHERE PMC.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 ) PM.product_type = 3 AND (CASE WHEN pm.src_id IS NULL THEN node_type > 3 ELSE pid IN (src_id) END) OR ( PM.product_type != 3 AND (CASE WHEN pm.src_id IS NULL THEN pid IS NULL ELSE pid IN (src_id) END) ) ) and ((node_type > ${nodeType}) or ( id not in (select src_id from product_model where pid = ${pid} and is_delete=0))) ORDER BY node_type,sort ORDER BY PMC.node_type, PMC.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 ORDER BY node_type,sort ORDER BY node_type, sort </select> <select id="getNo" resultType="java.lang.Integer"> SELECT COUNT(*) web/public/²úÆ·½á¹¹Ê÷µ¼ÈëÄ£°å.xlsxBinary files differ
web/src/views/modules/baseReliability/ParamDataBasic.vue
@@ -112,29 +112,30 @@ }) }, cellStyle({row, column, rowIndex, columnIndex}) { let warningColor = false; // console.log(row, column, rowIndex, columnIndex); //console.log(row, "row"); Object.keys(row).forEach((key, index) => { //é忝è¡ä¸æ¯ä¸ªæ°æ®çstate if (key === "repairMttcr" || key === "basicMtbfRegulate") { //console.log(key, "row key"); let val = row[key] const numM = Number(val).toFixed(5); if (numM.substring(0, numM.length - 1) === '0.0000' && val > 0) { //å®ä½è¯¥æ°æ®çåæ if (columnIndex === 2) { warningColor = true; } } } }); if (warningColor) { // red为æ³åæçåå æ ¼æ ·å¼ const numM1 = Number(row.repairMttcr).toFixed(5); const numM2 = Number(row.basicMtbfRegulate).toFixed(5); console.log(numM1,numM2,'234') if (numM1.substring(0, numM1.length - 1) === '0.0000' && row.repairMttcr > 0 && column.property ==="repairMttcr") { return 'color : red' } else if (numM2.substring(0, numM1.length - 1) === '0.0000' && row.basicMtbfRegulate > 0 && column.property ==="basicMtbfRegulate") { return 'color : red' }else { return '' } return ""; // Object.keys(row).forEach((key, index) => { // //é忝è¡ä¸æ¯ä¸ªæ°æ®çstate // if (key === "repairMttcr" || key === "basicMtbfRegulate") { // //console.log(key, "row key"); // let val = row[key] // const numM = Number(val).toFixed(5); // if (numM.substring(0, numM.length - 1) === '0.0000' && val > 0) { // //å®ä½è¯¥æ°æ®çåæ // if (columnIndex === 2) { // warningColor = true; // } // } // } // }); }, } } web/src/views/modules/basicInfo/ParamData.vue
@@ -3,7 +3,7 @@ <el-row :gutter="5"> <el-col :span="4"> <div class="fa-card-a" style="margin-right: 5px;height: calc(100vh - 123px)"> <product-model-tree @on-selected="onProductSelected" showXdy="false" :isShow="false"/> <product-model-tree @on-selected="onProductSelected" @on-default="onDefault" showXdy="false" :isShow="false"/> </div> </el-col> <el-col :span="20"> @@ -37,7 +37,7 @@ </el-form-item> </el-form> <el-tabs v-model="activeName" @tab-click="handleClick"> <el-tab-pane label="åºæ¬å¯é æ§" name="first" > <el-tab-pane label="åºæ¬å¯é æ§" name="first"> <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:30}" :header-cell-style="{'text-align':'center'}" @@ -63,7 +63,8 @@ :hit="hit"/> </template> </el-table-column> <el-table-column v-if="dataForm.productType==='2'" :key="3" prop="baseOperatRatio" label="åºæ¬å¯é æ§è¿è¡æ¯" align="right"> <el-table-column v-if="dataForm.productType==='2'" :key="3" prop="baseOperatRatio" label="åºæ¬å¯é æ§è¿è¡æ¯" align="right"> <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.baseOperatRatio"></span> @@ -80,7 +81,7 @@ <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :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" align="center"> <el-table-column prop="basicJoinCompute" label="åå 计ç®" :key="6" width="100" align="center"> <template v-slot="{ row }"> <el-select v-if="row.isEdit" v-model="row.basicJoinCompute" placeholder="åå 计ç®"> @@ -98,7 +99,7 @@ <el-table-column prop="basicMtbfRegulate" :key="7" label="MTBF" align="right" width="110"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfRegulate"></el-input> <span v-else >{{scope.row.basicMtbfRegulate | keepNumber}}</span> <span v-else>{{scope.row.basicMtbfRegulate | keepNumber}}</span> </template> </el-table-column> <!--<el-table-column prop="basicMtbfAccept" :key="8" label="坿¥åçMTBF" width="100"> @@ -113,12 +114,12 @@ <span v-else v-text="scope.row.basicMtbfRegulSuccRate"></span> </template> </el-table-column> <!-- <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF坿¥åæåç" width="120"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAcceptSuccRate"></el-input> <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span> </template> </el-table-column>--> <!-- <el-table-column prop="basicMtbfAcceptSuccRate" :key="10" label="MTBF坿¥åæåç" width="120"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.basicMtbfAcceptSuccRate"></el-input> <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span> </template> </el-table-column>--> <el-table-column prop="basicUnitNum" label="åå æ°é" :key="11" width="100" align="center"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input> @@ -185,12 +186,12 @@ <span v-else v-text="scope.row.taskMtbcfRegulSuccRate"></span> </template> </el-table-column> <!-- <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF坿¥åæåç" width="100"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAcceptSuccRate"></el-input> <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span> </template> </el-table-column>--> <!-- <el-table-column prop="taskMtbcfAcceptSuccRate" :key="19" label="MTBCF坿¥åæåç" width="100"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfAcceptSuccRate"></el-input> <span v-else v-text="scope.row.taskMtbcfAcceptSuccRate"></span> </template> </el-table-column>--> <el-table-column prop="taskMtbcfOperatingRatio" :key="20" label="MTBCFè¿è¡æ¯" align="right"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.taskMtbcfOperatingRatio"></el-input> @@ -210,7 +211,8 @@ </template> </el-table-column> </el-table-column> <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :key="22" label="ç»´ä¿®åå¸" align="center"> <el-table-column v-if="dataForm.productType==='3'||dataForm.productType==='4'" :key="22" label="ç»´ä¿®åå¸" align="center"> <!-- <zt-table-column-dict prop="repairable" :keys="23" label="å¯ç»´ä¿®" dict="is_or_not"/>--> <el-table-column prop="repairable" label="å¯ç»´ä¿®" :key="23" width="80" align="center"> <template v-slot="{ row }"> @@ -246,7 +248,7 @@ <el-table-column prop="repairMttcr" label="MTTCR" :key="25" width="100" align="right"> <template slot-scope="scope"> <el-input v-if="scope.row.isEdit" v-model="scope.row.repairMttcr"></el-input> <span v-else >{{scope.row.repairMttcr | keepNumber}}</span> <span v-else>{{scope.row.repairMttcr | keepNumber}}</span> </template> </el-table-column> <el-table-column prop="repairMttcrOtherParams2" :key="26" label="MTTCRå ¶ä»åæ°2" align="right"> @@ -447,6 +449,12 @@ this.$refs.tableObj.query() }) }, onDefault(defaultId) { this.dataForm.srcId = defaultId this.dataForm.productType = 2 this.activeName = 'first' this.$refs.tableObj.query() }, dataLoaded(data) { this.dataList = data for (let dataList of data) { web/src/views/modules/basicInfo/ProductModelTree.vue
@@ -84,7 +84,6 @@ if (this.basic) { if (this.productList && this.productList[0].children) { this.defaultId = this.productList[0].children[0].id console.log(this.defaultId, 'this.defaultID') this.$nextTick(() => { this.$refs.tree.setCurrentKey(this.defaultId); //ä¸å®è¦å è¿ä¸ªéä¸äºå¦åæ ·å¼æ²¡æåºæ¥ }); web/src/views/modules/basicInfo/XhProductModel-AddOrUpdate.vue
@@ -84,8 +84,10 @@ productType: selected } let res = await this.$http.get(`/sysPictureBase/getDefaultImg`, {params: params}) this.dataForm.operatImgName = res.data.name this.dataForm.operatImg = res.data.id if (res.data){ this.dataForm.operatImgName = res.data.name this.dataForm.operatImg = res.data.id } }, selectPicture() { this.$refs.pictureSelect.$refs.dialog.init(this.dataForm.productType) web/src/views/modules/basicInfo/XhProductModel.vue
@@ -3,7 +3,8 @@ <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" ref="ProductModelTree"/> <product-model-tree @on-selected="onProductSelected" @on-default="onDefault" showXdy="true" ref="ProductModelTree"/> </div> </el-col> <el-col :span="19"> @@ -19,6 +20,8 @@ <el-form-item> <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==='1'" size="small" type="primary" @click="exportProduct()">å¯¼åºæ¨¡æ¿ </zt-button> <zt-button v-if="productType==='3'" type="primary" @click="addCell()">æ°å¢èåå </zt-button> <zt-button v-if="productType && productType!=='10'" type="delete" @click="table.deleteHandle()"/> </el-form-item> @@ -27,7 +30,7 @@ row-key="id" @selection-change="table.selectionChangeHandle" :header-cell-style="{'text-align':'center'}"> <el-table-column prop="name" label="åç§°" /> <el-table-column prop="name" label="åç§°"/> <zt-table-column-dict prop="productType" label="èç¹ç±»å" dict="product"/> <el-table-column prop="operatImg" label="è¿è¡å¾ç" align="center"> <template v-slot="{ row }"> @@ -46,7 +49,7 @@ <!-- å¼¹çª, æ°å¢ / ä¿®æ¹ --> <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> <select-ty-model @refreshDataList="refreshData" ref="SelectTyModel"/> <product-import @refreshDataList="refreshData" ref="ProductImport" /> <product-import @refreshDataList="refreshData" ref="ProductImport"/> </zt-table-wraper> </div> </el-col> @@ -104,19 +107,28 @@ this.$refs.ProductModelTree.getProductList() }, onProductSelected(data) { console.log(data,'onProductSelected') console.log(data, 'onProductSelected') this.dataForm.pid = data.id this.dataForm.type = data.productType this.productType = data.productType if (data.productType !== '10') { this.$refs.tableObj.query() } console.log(data.productType,' data.productType') console.log(this.productType,' data.productType') console.log(data.productType, ' data.productType') console.log(this.productType, ' data.productType') }, importData(row) { this.$refs.ProductImport.$refs.dialog.init(row) } }, exportProduct() { window.location.href = './产åç»ææ å¯¼å ¥æ¨¡æ¿.xlsx' }, onDefault(defaultId) { this.dataForm.pid = defaultId this.dataForm.type = 2 this.productType = 2 this.$refs.tableObj.query() }, } } </script> web/src/views/modules/taskReliability/ModelRbd.vue
@@ -3,7 +3,7 @@ <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" :isShow="false"/> <product-model-tree @on-selected="onProductSelected" @on-default="onDefault" showXdy="true" :isShow="false"/> </div> </el-col> <el-col :span="19"> @@ -88,6 +88,10 @@ console.log(data, 'onProductSelected(data)') this.$refs.tableObj.query() }, onDefault(defaultId){ this.dataForm.productId = defaultId this.$refs.tableObj.query() }, drawRBD(row) { this.dialogVisible2 = true this.$nextTick(() => { web/src/views/modules/taskReliability/OperatCondit.vue
@@ -66,7 +66,6 @@ OperaConditModel, AddOrUpdate }, methods: { add() { this.$refs.AddOrUpdate.$refs.dialog.init(null, {productId: this.dataForm.productId}) @@ -79,6 +78,7 @@ let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') this.productList = res.data console.log(this.productList, ' async getTaskProductList()') this.onProductSelected(this.productList[0]) }, selectOperatCondit(row) { if (this.$refs.model.isChange) { @@ -93,12 +93,8 @@ } this.$refs.model.init(param) }, tableRowClassName( { row, rowIndex }) { if (row.id == this.currentId) { tableRowClassName({row, rowIndex}) { if (row.id === this.currentId) { return 'select-row'; } else { return 'not-select-row';