图形描述功能

This commit is contained in:
446052889@qq.com 2022-07-01 00:21:08 +08:00
parent c8d516b6b0
commit f188649688

View File

@ -10,10 +10,10 @@
</div>
<div class="div-repository-title">
<span class="text-general-color">
{{methodName}}
{{ methodName }}
</span>
<p class="text-second-color header-method-id">
<b>({{methodId}})</b>
<b>({{ methodId }})</b>
</p>
</div>
<div class="header-method-attr-config-icon">
@ -54,6 +54,14 @@
prop="id"
label="ID">
</el-table-column>
<el-table-column
prop="desc"
label="描述">
<template slot-scope="scope">
<el-input v-model="scope.row.desc" placeholder="请输入内容" size="small" maxlength="50"
@change="updateMethodObjectDesc(scope.row.id, scope.row.desc)"></el-input>
</template>
</el-table-column>
<el-table-column
prop="modelName"
label="所属模型"
@ -78,10 +86,12 @@
<div class="operate-icon-display" style="text-align: center;height: 30px;line-height: 30px;">
<p class="text-second-color">
<el-tooltip v-if="scope.row.showShapeConfig" content="数据显示规则配置" placement="bottom" :hide-after=2000>
<i style="display: inline-block;cursor: pointer;margin-right: 10px;" class="iconfont" @click="handleShapeAnchorConfig(scope.row.id)">&#xe61c;</i>
<i style="display: inline-block;cursor: pointer;margin-right: 10px;" class="iconfont"
@click="handleShapeAnchorConfig(scope.row.id)">&#xe61c;</i>
</el-tooltip>
<el-tooltip content="形状属性配置" placement="bottom" :hide-after=2000>
<i style="display: inline-block;cursor: pointer;position: relative;font-size: 23px;top: 3px;" class="iconfont" @click="handleShapeAttrConfig(scope.row.id)">&#xe632;</i>
<i style="display: inline-block;cursor: pointer;position: relative;font-size: 23px;top: 3px;"
class="iconfont" @click="handleShapeAttrConfig(scope.row.id)">&#xe632;</i>
</el-tooltip>
</p>
</div>
@ -100,14 +110,17 @@
<div v-loading="drawer.loading">
<div id="drawerBody" style="overflow-y: auto;">
<!-- 扩展属性 -->
<div v-for="item in drawer.data" class="attr-row" @click="(item.isUse ? item.isUse = false : item.isUse = true)">
<span>{{item.name}}<span class="text-second-color" style="font-size=12px;">{{item.id}}</span></span>
<div v-for="item in drawer.data" class="attr-row"
@click="(item.isUse ? item.isUse = false : item.isUse = true)">
<span>{{ item.name }}<span class="text-second-color" style="font-size=12px;">{{ item.id }}</span></span>
<i v-if="item.isUse" class="awsui-iconfont" style="float: right;color: #4E7FF9;">&#xe639;</i>
</div>
</div>
<div class="drawer-footer" :style="{'background-color': '#F2F2F2', height: drawer.footerHeight}">
<div id="drawerFooter" style="float: right;position: relative;top: 9px;">
<awsui-button size="large" style="width: 80px;" class="button-general-color" type="primary" :disabled="drawer.buttonDisabled" @click="saveAttrConfig">保存</awsui-button>
<awsui-button size="large" style="width: 80px;" class="button-general-color" type="primary"
:disabled="drawer.buttonDisabled" @click="saveAttrConfig">保存
</awsui-button>
<awsui-button size="large" style="width: 80px;" @click="closeDrawer">取消</awsui-button>
</div>
</div>
@ -127,10 +140,10 @@
</template>
<script>
import awsuiAxios from "../../awsuiAxios";
import MethodShapeAnchorDlg from "./MethodShapeAnchorDlg";
import awsuiAxios from "../../awsuiAxios";
import MethodShapeAnchorDlg from "./MethodShapeAnchorDlg";
export default {
export default {
name: "MethodObject",
components: {MethodShapeAnchorDlg},
props: {
@ -191,8 +204,8 @@
that.loadingText = '加载中';
that.loading = true;
const params = {
url:'jd',
data:{
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_method_shape_definition_data_query',
methodId: that.methodId
}
@ -209,14 +222,14 @@
} else {
alert('请求响应错误');
}
}).catch(error=>{
}).catch(error => {
console.log(error);
that.loading = false;
})
},
handleDataNo(data) {//
for (let i = 0; i < data.length; i++) {
data[i].no = i+1;
data[i].no = i + 1;
}
return data;
},
@ -245,13 +258,13 @@
that.drawer.type = 'shape';
that.drawer.shapeName = shapeName;
that.drawer.visible = true;
that.$nextTick(function(){
that.$nextTick(function () {
that.initDrawerBodyHeight();
});
that.drawer.loading = true;
const params = {
url:'jd',
data:{
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_method_shape_more_attr_config_query',
methodId: that.methodId,
shapeName: shapeName,
@ -265,7 +278,7 @@
} else {
alert('请求响应错误');
}
}).catch(error=>{
}).catch(error => {
console.log(error);
that.drawer.loading = false;
})
@ -278,13 +291,13 @@
that.drawer.type = 'file';
that.drawer.shapeName = '';
that.drawer.visible = true;
that.$nextTick(function(){
that.$nextTick(function () {
that.initDrawerBodyHeight();
});
that.drawer.loading = true;
const params = {
url:'jd',
data:{
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_method_file_more_attr_config_query',
methodId: that.methodId,
wsId: that.$store.getters.getWsIdFn
@ -297,7 +310,7 @@
} else {
alert('请求响应错误');
}
}).catch(error=>{
}).catch(error => {
console.log(error);
that.drawer.loading = false;
})
@ -306,7 +319,7 @@
const that = this;
const type = that.drawer.type;
if (that.drawer.data.length == 0) {
that.$message({message: '无相关属性进行保存',type: 'warning'});
that.$message({message: '无相关属性进行保存', type: 'warning'});
return;
}
that.drawer.buttonDisabled = true;
@ -314,8 +327,8 @@
that.loadingText = '正在更新资产库文件'
that.loading = true;
const params = {
url:'jd',
data:{
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_method_more_attr_config_save',
attrData: JSON.stringify(that.drawer.data),
wsId: that.$store.getters.getWsIdFn,
@ -327,12 +340,12 @@
//
awsuiAxios.post(params).then(function (ro) {
that.loading = false;
if(ro.result == 'ok') {
that.$message({message: '更新成功',type: 'success'});
if (ro.result == 'ok') {
that.$message({message: '更新成功', type: 'success'});
} else {
that.$message.error(ro.msg);
}
}).catch(error=>{
}).catch(error => {
console.log(error);
})
},
@ -358,8 +371,8 @@
handleSaveShapeAnchorConfig(result) {
const that = this;
const params = {
url:'jd',
data:{
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_shape_config_save',
wsId: result.wsId,
methodId: result.methodId,
@ -370,9 +383,32 @@
awsuiAxios.post(params).then(function (ro) {//
if (ro.result == 'ok') {
that.shapeAnchorConfig.visible = false;
that.$message({showClose: true,message: '保存成功',type: 'success'});
that.$message({showClose: true, message: '保存成功', type: 'success'});
}
}).catch(error=>{
}).catch(error => {
console.log(error);
})
},
updateMethodObjectDesc(shapeName, desc) {
const that = this;
const params = {
url: 'jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal_pl_manage_method_object_desc_save',
shapeName: shapeName,
desc: desc,
methodId: that.methodId
}
};
//
awsuiAxios.post(params).then(function (ro) {
that.loading = false;
if (ro.result == 'ok') {
that.$message({message: '更新成功', type: 'success'});
} else {
that.$message.error(ro.msg);
}
}).catch(error => {
console.log(error);
})
}
@ -388,17 +424,18 @@
this.initDrawerBodyHeight();
}
}
}
}
</script>
<style scoped>
#methodObject >>> .awsui-sidebar__header {
#methodObject >>> .awsui-sidebar__header {
margin-bottom: 0px;
padding: 15px 20px 15px 20px;
border-bottom: 1px solid #f2f2f2;
font-size: 16px;
}
.icon-div-repository {
}
.icon-div-repository {
border-radius: 50%;
margin-left: 15px;
display: inline-block;
@ -407,14 +444,16 @@
text-align: center;
line-height: 30px;
vertical-align: middle;
}
.icon-dynamic-repository {
}
.icon-dynamic-repository {
color: white;
font-size: 16px;
/*position: relative;*/
/*top: -1px;*/
}
.div-repository-title {
}
.div-repository-title {
display: inline-block;
position: relative;
left: 10px;
@ -422,36 +461,41 @@
height: 30px;
line-height: 30px;
vertical-align: middle;
}
.attr-row {
}
.attr-row {
padding: 10px 20px;
height: 35px;
line-height: 35px;
vertical-align: middle;
}
.attr-row:hover {
}
.attr-row:hover {
background-color: #f2f2f2;
}
.header-div {
}
.header-div {
width: 100%;
height: 100%;
background-color: #F5F7FA;
line-height: 43px;
vertical-align: middle;
}
.header-method-id {
display:inline-block;
font-size:12px;
}
.header-method-id {
display: inline-block;
font-size: 12px;
/*-webkit-transform: scale(0.9);*/
position: relative;
left: 0px;
}
.header-method-attr-config-icon {
display:inline-block;
}
.header-method-attr-config-icon {
display: inline-block;
height: 30px;
line-height: 30px;
vertical-align: middle;
position:relative;
left:10px;
}
position: relative;
left: 10px;
}
</style>