Browse Source

工具属性 修改名称 添加同步IFS的方法

master
rui_li 2 months ago
parent
commit
0e898fd1bb
  1. 13
      src/api/tool/tool_property.js
  2. 4
      src/views/modules/tooling/components/com_tool_property_show.vue
  3. 37
      src/views/modules/tooling/components/tool_property.vue

13
src/api/tool/tool_property.js

@ -0,0 +1,13 @@
import { createAPI } from "@/utils/httpRequest.js";
export const propertiesList = data => createAPI(`/properties/propertiesList`,'get',data)
export const refreshPropertiesModal= (data) => createAPI(`/properties/refreshPropertiesModal`,'post',data)
export const updatePropertiesList= (data) => createAPI(`/properties/updatePropertiesList`,'post',data)
export const getPropertiesListByPartAndCodeNo = (data) => createAPI(`/properties/getPropertiesListByPartAndCodeNo`,'post',data)
export const searchPropertiesItemList= data => createAPI(`/properties/searchPropertiesItemList`,'post',data)
export const saveSubPropertiesValueForAlone= data => createAPI(`/properties/saveSubPropertiesValueForAlone`,'post',data)
export const deleteSubPropertiesValueForAlone= data => createAPI(`/properties/deleteSubPropertiesValueForAlone`,'post',data)
// 同步IFS属性 LR
export const syncIfsProperty = data => createAPI(`/plm/tool/syncIfsProperties`,'post',data)

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

@ -25,7 +25,7 @@
<!--工具属性的使用记录-->
<fieldset class="customer-fieldset" style="width: 650px;">
<legend>属性维护</legend>
<propertyTable ref="propertyTable" v-if="visible" :site="site" :order-no="dataNo" :code-no="propertyNo" :function-type="propertyType"></propertyTable>
<propertyTable ref="propertyTable" v-if="visible" :site="site" :order-no="dataNo" :code-no="propertyNo" :function-type="propertyType"></propertyTable>
</fieldset>
</el-form>
</el-container>
@ -35,7 +35,7 @@
<script>
import propertyTable from "./orderProperties"
import propertyTable from "./tool_property"
var functionId = 'C106003005';
export default {

37
src/views/modules/tooling/components/orderProperties.vue → src/views/modules/tooling/components/tool_property.vue

@ -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
Loading…
Cancel
Save