|
@@ -15,11 +15,6 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="选择设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipdefid">
|
|
|
- <a-input v-model="model.equipdefid" placeholder="请输入设备类型" ></a-input>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
|
|
|
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
|
|
|
</a-form-model-item>
|
|
@@ -27,12 +22,11 @@
|
|
|
</a-row>
|
|
|
<div class="cmms-dialog-item-title u-flex-jab">
|
|
|
<div>巡检项目设置</div>
|
|
|
- <div @click="addInspectItem"><a-icon type="plus"/>巡检项目</div>
|
|
|
+ <div @click="addInspectContent"><a-icon type="plus"/>巡检项目</div>
|
|
|
</div>
|
|
|
<a-table
|
|
|
ref="table"
|
|
|
size="middle"
|
|
|
- :scroll="{x:true}"
|
|
|
bordered
|
|
|
rowKey="id"
|
|
|
:columns="columns"
|
|
@@ -40,8 +34,21 @@
|
|
|
:pagination="false"
|
|
|
class="j-table-force-nowrap">
|
|
|
<!-- :loading="loading" -->
|
|
|
+ <div slot="expandedRowRender" slot-scope="record">
|
|
|
+ <a-table
|
|
|
+ ref="table"
|
|
|
+ size="middle"
|
|
|
+ bordered
|
|
|
+ rowKey="id"
|
|
|
+ :columns="innerColumns"
|
|
|
+ :dataSource="record.cmmsInspectContentItemList"
|
|
|
+ :pagination="false"
|
|
|
+ class="j-table-force-nowrap">
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
</a-table>
|
|
|
</a-form-model>
|
|
|
+ <inspect-spot-modal-add ref="addContentRef" :selectData="model.inspectContentList" @ok="handleOk"></inspect-spot-modal-add>
|
|
|
</j-form-container>
|
|
|
</a-spin>
|
|
|
</template>
|
|
@@ -50,10 +57,12 @@
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
+ import InspectSpotModalAdd from './InspectSpotModalAdd.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'InspectSpotForm',
|
|
|
components: {
|
|
|
+ InspectSpotModalAdd
|
|
|
},
|
|
|
props: {
|
|
|
//表单禁用
|
|
@@ -66,7 +75,8 @@
|
|
|
data () {
|
|
|
return {
|
|
|
model:{
|
|
|
- },
|
|
|
+ inspectContentList: []
|
|
|
+ },
|
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
|
sm: { span: 5 },
|
|
@@ -81,7 +91,7 @@
|
|
|
url: {
|
|
|
add: "/cmmsInspectSpot/cmmsInspectSpot/add",
|
|
|
edit: "/cmmsInspectSpot/cmmsInspectSpot/edit",
|
|
|
- queryById: "/cmmsInspectSpot/cmmsInspectSpot/queryById"
|
|
|
+ queryById: "/cmmsInspectSpot/cmmsInspectSpot/queryById",
|
|
|
},
|
|
|
columns: [
|
|
|
// {
|
|
@@ -125,6 +135,38 @@
|
|
|
dataIndex: 'remark'
|
|
|
}
|
|
|
],
|
|
|
+ innerColumns: [
|
|
|
+ // {
|
|
|
+ // title: '#',
|
|
|
+ // dataIndex: '',
|
|
|
+ // key:'rowIndex',
|
|
|
+ // width:60,
|
|
|
+ // align:"center",
|
|
|
+ // customRender:function (t,r,index) {
|
|
|
+ // return parseInt(index)+1;
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ title:'点检项编号',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'itemcode'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'点检项名称',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'itemname'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'标准',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'inspectionstandards',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'备注',
|
|
|
+ align:"center",
|
|
|
+ dataIndex: 'remark'
|
|
|
+ }
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -141,12 +183,17 @@
|
|
|
this.visible = true;
|
|
|
// this.edit(this.modelDefault);
|
|
|
},
|
|
|
+ addInspectContent(){
|
|
|
+ this.$refs.addContentRef.add();
|
|
|
+ this.$refs.addContentRef.title = "选择巡检项目";
|
|
|
+ },
|
|
|
edit (record) {
|
|
|
this.visible = true;
|
|
|
this.confirmLoading = true
|
|
|
// this.model = Object.assign({}, record);
|
|
|
getAction(this.url.queryById, {id: record.id}).then((res) => {
|
|
|
this.model = res.result
|
|
|
+ console.log(res)
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
},
|
|
@@ -179,6 +226,12 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ handleOk(data){
|
|
|
+ data.map(res=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ this.model.inspectContentList = data;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|