Browse Source

工具的属性代码

master
DouDou 1 year ago
parent
commit
dcb48ff42d
  1. 4
      src/views/modules/demoComponents/orderProperties.vue
  2. 129
      src/views/modules/tooling/components/com_tool_property_show.vue
  3. 29
      src/views/modules/tooling/manuf_tool.vue

4
src/views/modules/demoComponents/orderProperties.vue

@ -310,6 +310,10 @@ export default {
})
},
},
created() {
this.getProperties();
},
}
</script>

129
src/views/modules/tooling/components/com_tool_property_show.vue

@ -0,0 +1,129 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag :visible.sync="visible" :close-on-click-modal="false"
width="690px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 465px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 第一行 -->
<el-row class="customer-row">
<el-col :span="8">
<el-form-item label="域">
<el-input v-model="pageData.site" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工具标识号">
<el-input v-model="pageData.toolId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="工具实例">
<el-input v-model="pageData.toolInstance" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<!--工具属性的使用记录-->
<fieldset class="customer-fieldset" style="width: 650px;">
<legend>生命周期维护</legend>
<propertyTable ref="propertyTable" v-if="visible" :order-no="dataNo" :code-no="propertyNo" :function-type="propertyType"></propertyTable>
</fieldset>
</el-form>
</el-container>
</el-dialog>
</div>
</template>
<script>
import propertyTable from "@/views/modules/demoComponents/orderProperties"
var functionId = 'C106003005';
export default {
components: {
propertyTable,/*属性的修改和修改组件*/
},
data() {
return {
titleCon: '工具新增',
propertyType: 'TL',
propertyNo: 'TL01',
dataNo: '1001',//
visible: false,
showFlag: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
toolId: '',
toolInstance: '',
},
dataListLoading: false,
}
},
methods: {
//
init(toolInfo, dataType) {
//
if(dataType === 'TL'){
this.showFlag = false;
this.dataNo = toolInfo.toolId;
this.propertyNo = toolInfo.propertyNo;
this.propertyType = 'TL';
this.titleCon = '工具属性维护';
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId;
this.pageData.toolInstance = '';
}else if(dataType === 'TLI'){
this.showFlag = false;
this.dataNo = toolInfo.toolId+"#"+toolInfo.toolInstance;
this.propertyNo = toolInfo.propertyNo;
this.propertyType = 'TLI';
this.titleCon = '工具实例属性维护';
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId;
this.pageData.toolInstance = toolInfo.toolInstance;
}
this.visible = true;
},
/*关闭modal*/
closeDialog(){
//
this.visible = false;
//this.$emit('update:visible', false);
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*table中input 修改样式*/
/deep/ div.table-el-date {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-el-date /deep/ input.el-input__inner{
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
/* 特殊的样式*/
/deep/ .el-table div.cell:has(.table-el-date) {
/* 直接作用于 <td> 元素 */
padding: 0px;
height: 25px;
}
</style>

29
src/views/modules/tooling/manuf_tool.vue

@ -47,8 +47,9 @@
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="editToolInfoModal(scope.row)">编辑</a>
<a type="text" size="small" @click="deleteToolInfoConfirm(scope.row)">删除</a>
<a type="text" size="small" @click="editToolInfoModal(scope.row)">编辑 </a>
<a type="text" size="small" v-if = "scope.row.propertyNo && scope.row.propertyNo !== ''" @click="editToolInfoPropertyModal(scope.row)">属性 </a>
<a type="text" size="small" @click="deleteToolInfoConfirm(scope.row)">删除 </a>
</template>
</el-table-column>
<el-table-column
@ -113,6 +114,7 @@
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="editToolInstanceModal(scope.row)">编辑</a>
<a type="text" size="small" @click="editToolInstanceDateModal(scope.row, 'toolInstance')">属性</a>
<a type="text" size="small" @click="editToolInstanceDateModal(scope.row)">生命周期</a>
<a type="text" size="small" @click="deleteToolInstanceConfirm(scope.row)">删除</a>
</template>
@ -135,6 +137,10 @@
<toolInstanceDateShow ref="toolInstanceDateShow" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData">
</toolInstanceDateShow>
<!-- 工具属性信息 -->
<toolPropertyShow ref="toolPropertyShow" :close-on-click-modal="false" >
</toolPropertyShow>
</div>
</template>
@ -151,7 +157,7 @@ import Chooselist from '@/views/modules/common/Chooselist'; /*选择组件*/
import toolInfoAddUpdate from "./components/com_tool_info_add_update"; /*工具新增和修改组件*/
import toolInstanceAddUpdate from "./components/com_tool_instance_add_update"; /*工具实例新增和修改组件*/
import toolInstanceDateShow from "./components/com_tool_instance_date_show"; /*工具实例新增日期和修改组件*/
import toolPropertyShow from "./components/com_tool_property_show"; /*工具属性修改组件*/
/*組件*/
export default {
components: {
@ -159,6 +165,7 @@ export default {
toolInfoAddUpdate,/*工具新增和修改组件*/
toolInstanceAddUpdate,/*工具实例新增和修改组件*/
toolInstanceDateShow,/*工具实例新增日期和修改组件*/
toolPropertyShow,/*工具属性修改组件*/
},
name: "null",
data() {
@ -721,6 +728,22 @@ export default {
});
},
/*工具属性的维护*/
editToolInfoPropertyModal(toolInfo){
//modal
this.$nextTick(() => {
this.$refs.toolPropertyShow.init(toolInfo, 'TL');
});
},
/*工具实例属性的维护*/
editToolInstancePropertyModal(toolInfo){
//modal
this.$nextTick(() => {
this.$refs.toolPropertyShow.init(toolInfo, 'TLI');
});
},
/*删除工具的确认选项*/
deleteToolInfoConfirm(toolInfo) {
this.$confirm('是否删除工具标识号:'+ toolInfo.toolId+'?', '提示', {

Loading…
Cancel
Save