|
|
|
@ -3,6 +3,7 @@ |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button type="primary" :loading="loading" v-if="orderNo" :disabled="disabled" @click="clickSave">{{ attributeDialog?'编辑':'保存' }}</el-button> |
|
|
|
<el-button type="primary" @click="refreshPropertiesModal" :disabled="disabled" v-if="attributeDialog">刷新属性模板</el-button> |
|
|
|
<el-button type="primary" @click="syncIfsPropertyFunc" :disabled="disabled" v-if="attributeDialog">同步IFS属性</el-button> |
|
|
|
</div> |
|
|
|
<div class="rq " v-if="attributeDialog"> |
|
|
|
<el-table |
|
|
|
@ -86,9 +87,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo |
|
|
|
,searchPropertiesItemList,saveSubPropertiesValueForAlone,deleteSubPropertiesValueForAlone |
|
|
|
} from "@/api/base/properties.js"; |
|
|
|
import {propertiesList,refreshPropertiesModal,updatePropertiesList,getPropertiesListByPartAndCodeNo, |
|
|
|
searchPropertiesItemList,saveSubPropertiesValueForAlone,deleteSubPropertiesValueForAlone, |
|
|
|
syncIfsProperty |
|
|
|
} from "@/api/tool/tool_property.js"; |
|
|
|
import { |
|
|
|
removeTestPropertiesItem, |
|
|
|
saveTestPropertiesItem, searchTestPropertiesItemList, |
|
|
|
@ -327,6 +329,35 @@ export default { |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
syncIfsPropertyFunc(){ |
|
|
|
this.$confirm(`是否同步IFS系统中的属性数据?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let params = { |
|
|
|
site: this.site, |
|
|
|
partNo: this.orderNo, |
|
|
|
codeNo: this.codeNo, |
|
|
|
recordType: this.functionType, |
|
|
|
} |
|
|
|
syncIfsProperty(params).then(({data}) => { |
|
|
|
if (data && data.code === 200) { |
|
|
|
this.$message.success(data.resultMsg); |
|
|
|
this.getProperties(); |
|
|
|
this.attributeDialog = true; |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
this.loading = false |
|
|
|
}).catch((error) => { |
|
|
|
this.$message.error(error) |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
clickSave(){ |
|
|
|
if(this.dataList.length==0){ |
|
|
|
return false |