Browse Source

工具的代码

master
DouDou 1 year ago
parent
commit
0a6c53262a
  1. 13
      src/api/tool/com_tool_instance_date_show.js
  2. 32
      src/views/modules/tooling/components/com_tool_instance_add_update.vue
  3. 306
      src/views/modules/tooling/components/com_tool_instance_date_add_update.vue
  4. 328
      src/views/modules/tooling/components/com_tool_instance_date_show.vue
  5. 18
      src/views/modules/tooling/manuf_tool.vue

13
src/api/tool/com_tool_instance_date_show.js

@ -0,0 +1,13 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取
export const getToolInstanceDates = data => createAPI('plm/tool/getToolInstanceDates', 'POST', data)
// 获取
export const insertToolInstanceDate = data => createAPI('plm/tool/insertToolInstanceDate', 'POST', data)
// 获取
export const modifyToolInstanceDate = data => createAPI('plm/tool/modifyToolInstanceDate', 'POST', data)
// 删除
export const removeToolInstanceDate = data => createAPI('plm/tool/removeToolInstanceDate', 'POST', data)

32
src/views/modules/tooling/components/com_tool_instance_add_update.vue

@ -7,7 +7,7 @@
<!-- 第一行 -->
<el-row class="customer-row">
<el-col :span="4">
<el-form-item label="工具实例">
<el-form-item label="工具实例" prop="toolInstance">
<el-input v-model="pageData.toolInstance" :disabled="!this.addFlag"></el-input>
</el-form-item>
</el-col>
@ -291,35 +291,7 @@ export default {
objectType: 'label'
},
rules: {
site: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
toolId: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
toolDesc: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
toolType: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
calendarId: [
toolInstance: [
{
required: true,
message: ' ',

306
src/views/modules/tooling/components/com_tool_instance_date_add_update.vue

@ -1,115 +1,53 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag :visible.sync="visible" :close-on-click-modal="false"
width="490px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 325px;">
width="390px" style="height: 350px;" class="customer-dialog">
<el-container style="height: 125px;">
<el-form :inline="true" :model="pageData" :rules="rules" label-position="top" label-width="80px">
<!-- 第一行 -->
<el-row class="customer-row">
<el-col :span="12">
<el-form-item label="域">
<el-input v-model="pageData.site" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="10">
<el-form-item label="工具标识号">
<el-input v-model="pageData.toolId" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="工具实例">
<el-input v-model="pageData.toolInstance" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 第二行 -->
<el-row class="customer-row">
<el-col :span="12">
<el-form-item label="工具样品">
<el-input v-model="pageData.toolInstance" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工具样品描述">
<el-input v-model="pageData.description" disabled></el-input>
<el-col :span="10">
<el-form-item label="开始日期" prop="beginDate">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 150px;"
v-model="pageData.beginDate" @change="checkBeginDate()"
type="date"
placeholder="开始日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="6">
<el-form-item style="margin-left: 5px;">
<el-button type="primary" @click="addNewToolDate()">新增</el-button>
<el-col :span="10">
<el-form-item label="结束日期">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 150px;"
v-model="pageData.endDate" @change="checkEndDate()"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<!--材料的使用记录-->
<fieldset class="customer-fieldset" style="width: 350px;">
<legend>生命周期维护</legend>
<el-table
height="160"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 460px; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="开始日期">
<template slot-scope="scope" >
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%" :disabled="scope.id > 0"
v-model="scope.row.beginDate" @change="checkBeginDate(scope.row, scope.row.beginDate)"
type="date" class="table-el-date"
placeholder="开始日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="结束日期">
<template slot-scope="scope">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="scope.row.endDate" @change="checkEndDate(scope.row, scope.row.endDate)"
type="date" class="table-el-date"
placeholder="结束日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.id > 0" @click="saveToolInstanceDateModal(scope.row)">保存</a>
<a type="text" size="small" v-if="scope.row.id === 0" @click="insertToolInstanceDateModal(scope.row)">新增</a>
<a type="text" size="small" @click="deleteToolInstanceDateConfirm(scope.row, scope.$index)">删除</a>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveToolInfoFun">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
@ -120,7 +58,7 @@ import {
insertToolInstanceDate,
modifyToolInstanceDate,
removeToolInstanceDate,
} from '@/api/tool/com_tool_instance_date_add_update.js';
} from '@/api/tool/com_tool_instance_date_show.js';
var functionId = 'C106003003';
export default {
@ -129,79 +67,80 @@ export default {
titleCon: '工具新增',
showDefault: false,
visible: false,
dataList:[],
addFlag: true,
currentRow: {},
columnArray: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
toolId: '',
toolType: '',
id: 0,
toolInstance: '',
description: '',
beginDate: '',
endDate: '',
ifsRowId: 0,
ifsRowVersion: '',
},
dataListLoading: false,
rules: {
beginDate: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
},
}
},
methods: {
//
init(toolInfo) {
init(toolInfo, addFlag) {
this.visible = true;
this.addFlag = addFlag;
//
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId;
this.pageData.toolInstance = toolInfo.toolInstance;
this.pageData.description = toolInfo.description;
this.titleCon = '工具实例生命周期维护';
//
this.refreshToolInstanceDateList();
},
/*刷新工具信息*/
refreshToolInstanceDateList() {
getToolInstanceDates(this.pageData).then(({data}) => {
if (data.code == 200) {
this.dataList = data.rows;
}
this.dataListLoading = false
})
//
if(!addFlag){
this.pageData.id = toolInfo.id;
this.pageData.beginDate = toolInfo.beginDate;
this.pageData.endDate = toolInfo.endDate;
this.titleCon = '工具实例生命周期修改';
}else {
this.pageData.beginDate = '';
this.pageData.endDate = '';
this.pageData.id = 0;
this.titleCon = '工具实例生命周期新增';
}
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshTooInstanceData');
this.$emit('refreshToolInstanceDateList');
//
this.visible = false;
//this.$emit('update:visible', false);
},
/*新增加一行新的数据*/
addNewToolDate(){
let instanceDate = {'id': 0, 'site': this.pageData.site, 'toolId': this.pageData.toolId, 'toolInstance': this.pageData.toolInstance,
'beginDate': '', 'endDate': '', 'ifsRowId': '', 'ifsRowVewrsion': ''};
//
this.dataList.push(instanceDate);
},
/*检查新的工信息*/
checkBeginDate(row, beginDate){
if(null == beginDate || beginDate === ''){
checkBeginDate(){
if(null == this.pageData.beginDate || this.pageData.beginDate === ''){
this.$message.error('开始日期必须存在!');
}
const begin = this.dayjs(beginDate);
const begin = this.dayjs(this.pageData.beginDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (begin.valueOf() < now.valueOf()) {
this.$message.error('开始日期不能小于当前日期!');
row.beginDate = '';
this.pageData.beginDate = '';
}
//
if(!(null == row.endDate || '' === row.endDate )){
const end = this.dayjs(row.endDate);
if(!(null == this.pageData.endDate || '' === this.pageData.endDate)){
const end = this.dayjs(this.pageData.endDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
}
@ -209,107 +148,66 @@ export default {
},
/*检查新的工信息*/
checkEndDate(row, endDate){
if(null == endDate || endDate === ''){
endDate = '3000-01-01';
checkEndDate(){
if(null == this.pageData.endDate || this.pageData.endDate === ''){
this.pageData.endDate = '3000-01-01';
}
const end = this.dayjs(endDate);
const end = this.dayjs(this.pageData.endDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (end.valueOf() < now.valueOf()) {
this.$message.error('结束日期不能小于当前日期!');
row.endDate = '';
this.pageData.endDate = '';
}
//
const begin = this.dayjs(row.beginDate);
const begin = this.dayjs(this.pageData.beginDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
row.endDate = '';
this.pageData.endDate = '';
}
},
/*新增工具实例的生命周期*/
insertToolInstanceDateModal(row){
if(null == row.beginDate || row.beginDate === ''){
/*新增加一行新的数据*/
saveToolInfoFun(){
if(null == this.pageData.beginDate || this.pageData.beginDate === ''){
this.$message.error('开始日期必须存在!');
}
const begin = this.dayjs(row.beginDate);
const begin = this.dayjs(this.pageData.beginDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (begin.valueOf() < now.valueOf()) {
this.$message.error('开始日期不能小于当前日期!');
row.beginDate = '';
this.pageData.beginDate = '';
}
//
if(!(null == row.endDate || '' === row.endDate )){
const end = this.dayjs(row.endDate);
if(!(null == this.pageData.endDate || '' === this.pageData.endDate )){
const end = this.dayjs(this.pageData.endDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
}
}
insertToolInstanceDate(row).then(({data}) =>{
if(data.code === 200){
this.$message.success('操作成功!');
//
this.refreshToolInstanceDateList();
}else{
this.$message.error(data.msg);
}
});
},
/*检查新的工信息*/
saveToolInstanceDateModal(row){
if(null == row.beginDate || row.beginDate === ''){
this.$message.error('开始日期必须存在!');
}
const begin = this.dayjs(row.beginDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (begin.valueOf() < now.valueOf()) {
this.$message.error('开始日期不能小于当前日期!');
row.beginDate = '';
}
//
if(!(null == row.endDate || '' === row.endDate )){
const end = this.dayjs(row.endDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
}
//
if(this.addFlag){
insertToolInstanceDate(this.pageData).then(({data}) =>{
if(data.code === 200){
this.$message.success('操作成功!');
//
this.closeDialog();
}else{
this.$message.error(data.msg);
}
});
}else {
modifyToolInstanceDate(this.pageData).then(({data}) =>{
if(data.code === 200){
this.$message.success('操作成功!');
//
this.closeDialog();
}else{
this.$message.error(data.msg);
}
});
}
modifyToolInstanceDate(row).then(({data}) =>{
if(data.code === 200){
this.$message.success('操作成功!');
//
this.refreshToolInstanceDateList();
}else{
this.$message.error(data.msg);
}
});
},
/*删除处理业务*/
deleteToolInstanceDateConfirm(row, index){
//
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
if (row.id === 0){
this.dataList.splice(index, 1);
this.$message.success('操作成功!');
}else {
removeToolInstanceDate(row).then(({data}) => {
if (data.code === 200) {
this.$message.success('操作成功!');
this.refreshToolInstanceDateList();
} else {
this.$message.error(data.msg);
}
})
}
})
}
},
created() {
// this.factoryList()
@ -322,12 +220,12 @@ export default {
<style scoped lang="scss">
/*调整两个input的间距*/
.customer-row .el-col-4 + .el-col-4 {
margin-left: 25px;
.customer-row .el-col-10 + .el-col-10 {
margin-left: 45px;
}
.customer-row .el-input--medium {
width: 135px !important;
width: 150px !important;
}
/*table中input 修改样式*/

328
src/views/modules/tooling/components/com_tool_instance_date_show.vue

@ -0,0 +1,328 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag :visible.sync="visible" :close-on-click-modal="false"
width="490px" style="height: 650px;" class="customer-dialog">
<el-container style="height: 325px;">
<el-form :inline="true" :model="pageData" 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.toolDesc" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 第二行 -->
<el-row class="customer-row">
<el-col :span="8">
<el-form-item label="工具分类">
<el-input v-model="pageData.toolType" 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-col :span="8">
<el-form-item label="工具实例描述">
<el-input v-model="pageData.description" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="6">
<el-form-item style="margin-left: 5px;">
<el-button type="primary" @click="insertToolInstanceDateModal()">新增</el-button>
</el-form-item>
</el-col>
</el-row>
<!--材料的使用记录-->
<fieldset class="customer-fieldset" style="width: 350px;">
<legend>生命周期维护</legend>
<el-table
height="160"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 460px; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="开始日期">
<template slot-scope="scope" >
<span> {{ scope.row['beginDate'] }}</span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="170"
label="结束日期">
<template slot-scope="scope">
<span> {{ scope.row['endDate'] }}</span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="editToolInstanceDateModal(scope.row)">修改</a>
<a type="text" size="small" @click="deleteToolInstanceDateConfirm(scope.row, scope.$index)">删除</a>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-form>
</el-container>
</el-dialog>
<!-- 工具实例生命周期信息 -->
<toolInstanceDateAddUpdate ref="toolInstanceDateAddUpdate" :close-on-click-modal="false" @refreshToolInstanceDateList="refreshToolInstanceDateList">
</toolInstanceDateAddUpdate>
</div>
</template>
<script>
import {
getToolInstanceDates,
insertToolInstanceDate,
modifyToolInstanceDate,
removeToolInstanceDate,
} from '@/api/tool/com_tool_instance_date_show.js';
import toolInstanceDateAddUpdate from "./com_tool_instance_date_add_update";/*工具实例生命周期的的新增和修改组件*/
var functionId = 'C106003003';
export default {
components: {
toolInstanceDateAddUpdate,/*工具实例新增日期和修改组件*/
},
data() {
return {
titleCon: '工具新增',
showDefault: false,
visible: false,
dataList:[],
currentRow: {},
columnArray: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
toolId: '',
toolType: '',
toolDesc: '',
toolInstance: '',
description: '',
beginDate: '',
endDate: '',
ifsRowId: 0,
ifsRowVersion: '',
},
dataListLoading: false,
}
},
methods: {
//
init(toolInfo) {
this.visible = true;
//
this.pageData.site = toolInfo.site;
this.pageData.toolId = toolInfo.toolId;
this.pageData.toolDesc = toolInfo.toolDesc;
this.pageData.toolInstance = toolInfo.toolInstance;
this.pageData.toolType = toolInfo.toolType;
this.pageData.description = toolInfo.description;
this.titleCon = '工具实例生命周期维护';
//
this.refreshToolInstanceDateList();
},
/*刷新工具信息*/
refreshToolInstanceDateList() {
getToolInstanceDates(this.pageData).then(({data}) => {
if (data.code == 200) {
this.dataList = data.rows;
}
this.dataListLoading = false
})
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshTooInstanceData');
//
this.visible = false;
//this.$emit('update:visible', false);
},
/*检查新的工信息*/
checkBeginDate(row, beginDate){
if(null == beginDate || beginDate === ''){
this.$message.error('开始日期必须存在!');
}
const begin = this.dayjs(beginDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (begin.valueOf() < now.valueOf()) {
this.$message.error('开始日期不能小于当前日期!');
row.beginDate = '';
}
//
if(!(null == row.endDate || '' === row.endDate )){
const end = this.dayjs(row.endDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
}
}
},
/*工具实例的生命周期*/
editToolInstanceDateModal(toolInfo){
//
if(Object.keys(toolInfo).length > 0){
//modal
this.$nextTick(() => {
this.$refs.toolInstanceDateAddUpdate.init(toolInfo, false)
});
}else{
this.$message.error('请先选择工具实例再添加工具实例!');
}
},
/*新增工具实例的生命周期*/
insertToolInstanceDateModal(){
this.$nextTick(() => {
this.$refs.toolInstanceDateAddUpdate.init(this.pageData,true)
});
},
/*检查新的工信息*/
saveToolInstanceDateModal(row){
if(null == row.beginDate || row.beginDate === ''){
this.$message.error('开始日期必须存在!');
}
const begin = this.dayjs(row.beginDate);
const now = this.dayjs(this.dayjs().format('YYYY-MM-DD'));
if (begin.valueOf() < now.valueOf()) {
this.$message.error('开始日期不能小于当前日期!');
row.beginDate = '';
}
//
if(!(null == row.endDate || '' === row.endDate )){
const end = this.dayjs(row.endDate);
if (begin.valueOf() > end.valueOf()) {
this.$message.error('结束日期不能小于开始日期!');
}
}
modifyToolInstanceDate(row).then(({data}) =>{
if(data.code === 200){
this.$message.success('操作成功!');
//
this.refreshToolInstanceDateList();
}else{
this.$message.error(data.msg);
}
});
},
/*删除处理业务*/
deleteToolInstanceDateConfirm(row, index){
//
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
if (row.id === 0){
this.dataList.splice(index, 1);
this.$message.success('操作成功!');
}else {
removeToolInstanceDate(row).then(({data}) => {
if (data.code === 200) {
this.$message.success('操作成功!');
this.refreshToolInstanceDateList();
} else {
this.$message.error(data.msg);
}
})
}
})
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调整两个input的间距*/
.customer-row .el-col-4 + .el-col-4 {
margin-left: 25px;
}
.customer-row .el-input--medium {
width: 135px !important;
}
/*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>

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

@ -132,8 +132,8 @@
</toolInstanceAddUpdate>
<!-- 工具实例生命周期信息 -->
<toolInstanceDateAddUpdate ref="toolInstanceDateAddUpdate" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData">
</toolInstanceDateAddUpdate>
<toolInstanceDateShow ref="toolInstanceDateShow" :close-on-click-modal="false" @refreshTooInstanceData="refreshTooInstanceData">
</toolInstanceDateShow>
</div>
</template>
@ -150,7 +150,7 @@ import {
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 toolInstanceDateAddUpdate from "./components/com_tool_instance_date_add_update"; /*工具实例新增日期和修改组件*/
import toolInstanceDateShow from "./components/com_tool_instance_date_show"; /*工具实例新增日期和修改组件*/
/*組件*/
export default {
@ -158,7 +158,7 @@ export default {
Chooselist,/*选择组件*/
toolInfoAddUpdate,/*工具新增和修改组件*/
toolInstanceAddUpdate,/*工具实例新增和修改组件*/
toolInstanceDateAddUpdate,/*工具实例新增日期和修改组件*/
toolInstanceDateShow,/*工具实例新增日期和修改组件*/
},
name: "null",
data() {
@ -419,7 +419,7 @@ export default {
columnProp: 'toolInstance',
headerAlign: 'center',
align: 'center',
columnLabel: '工具样品',
columnLabel: '工具实例',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -437,7 +437,7 @@ export default {
columnProp: 'description',
headerAlign: 'center',
align: 'center',
columnLabel: '工具样品描述',
columnLabel: '工具实例描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -761,11 +761,15 @@ export default {
/*工具实例的生命周期*/
editToolInstanceDateModal(toolInfo){
this.currentInstanceRow = toolInfo;
//
this.currentInstanceRow.toolType = this.currentRow.toolType;
this.currentInstanceRow.toolDesc = this.currentRow.toolDesc;
//
if(Object.keys(this.currentInstanceRow).length > 0){
//modal
this.$nextTick(() => {
this.$refs.toolInstanceDateAddUpdate.init(this.currentInstanceRow)
this.$refs.toolInstanceDateShow.init(this.currentInstanceRow)
});
}else{
this.$message.error('请先选择工具实例再添加工具实例!');

Loading…
Cancel
Save