File was renamed from web/src/views/modules/basicInfo/ParamDataExpect.vue |
| | |
| | | </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> |
| | |
| | | </el-table-column> |
| | | <el-table-column v-if="dataForm.nodeType==='2'" :key="5" label="基本可靠性计算"> |
| | | <!-- <zt-table-column-dict prop="joinCompute" :keys="6" label="参加计算" width="100" dict="is_or_not"/>--> |
| | | <el-table-column prop="joinCompute" label="参加计算" :key="6" width="100"> |
| | | <el-table-column prop="joinCompute" label="参加计算" :key="6" width="100"> |
| | | <template v-slot="{ row }"> |
| | | <el-select v-if="row.isEdit" v-model="row.joinCompute" |
| | | placeholder="参加计算"> |
| | |
| | | :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> |
| | |
| | | :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> |
| | |
| | | :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> |
| | |
| | | |
| | | <!-- <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="当前状态"> |
| | |
| | | |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update ref="AddOrUpdate" @refreshDataList="table.query"/> |
| | | <select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/> |
| | | </zt-table-wraper> |
| | | </div> |
| | |
| | | </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: '', |
| | |
| | | effect: '', |
| | | hit: false, |
| | | dataForm: { |
| | | pageCode: this.$route.query.pageCode, |
| | | id: '', |
| | | pid: '', |
| | | srcId: '', |
| | |
| | | } |
| | | }, |
| | | 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() |
| | |
| | | // }) |
| | | // 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 |