Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
a0049873 2022-07-15 17:40:38 +08:00
commit c0d59fdd24
6 changed files with 33 additions and 27 deletions

View File

@ -31,10 +31,10 @@
基本信息
</div>
<el-form-item label="融合服务名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入融合服务名称"></el-input>
<el-input class="input-box" v-model="dataForm.name" placeholder="请输入融合服务名称"></el-input>
</el-form-item>
<el-form-item label="融合服务描述" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入融合服务描述"></el-input>
<el-input class="input-box" v-model="dataForm.description" placeholder="请输入融合服务描述"></el-input>
</el-form-item>
<el-form-item label="应用领域" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择应用领域" filterable>
@ -43,19 +43,19 @@
</el-select>
</el-form-item>
<el-form-item label="部门联系人" prop="deptUser">
<el-input v-model="dataForm.deptUser" placeholder="请输入部门联系人"></el-input>
<el-input class="input-box" v-model="dataForm.deptUser" placeholder="请输入部门联系人"></el-input>
</el-form-item>
<el-form-item label="部门联系人电话" prop="mobile">
<el-input v-model="dataForm.mobile" placeholder="请输入部门联系人电话"></el-input>
<el-input class="input-box" v-model="dataForm.mobile" placeholder="请输入部门联系人电话"></el-input>
</el-form-item>
<el-form-item label="服务商" prop="provider">
<el-input v-model="dataForm.provider" placeholder="请输入服务商"></el-input>
<el-input class="input-box" v-model="dataForm.provider" placeholder="请输入服务商"></el-input>
</el-form-item>
<el-form-item label="服务商联系人" prop="providerUser">
<el-input v-model="dataForm.providerUser" placeholder="请输入服务商联系人"></el-input>
<el-input class="input-box" v-model="dataForm.providerUser" placeholder="请输入服务商联系人"></el-input>
</el-form-item>
<el-form-item label="服务商联系人电话" prop="providerMobile">
<el-input v-model="dataForm.providerMobile" placeholder="请输入服务商联系人电话"></el-input>
<el-input class="input-box" v-model="dataForm.providerMobile" placeholder="请输入服务商联系人电话"></el-input>
</el-form-item>
</div>
@ -493,4 +493,8 @@ export default {
color: #606266;
line-height: 32px;
}
.input-box {
width: 90%;
}
</style>

View File

@ -23,7 +23,7 @@
style="width: 100%" :height="qp ? '810px' : '650px'">
<el-table-column v-for="(item) in Object.keys(tableColumns)" :key="item" :prop="item" label="融合服务名称"
header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="94" right="0">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="240" right="0">
<template slot-scope="scope">
<el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small"
@click="handleUpdate(scope.row)">{{ $t("update") }}</el-button>

View File

@ -31,10 +31,10 @@
基本信息
</div>
<el-form-item label="名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入名称" :disabled="modalType === 'display'"></el-input>
<el-input v-model="dataForm.name" placeholder="请输入名称" :disabled="modalType === 'display'" style="width:90%"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述"
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%"
:disabled="modalType === 'display'"></el-input>
</el-form-item>
</div>

View File

@ -14,7 +14,7 @@
v-if="dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button style="margin-left:120px" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
<el-button style="margin-left:70px" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
type="primary">添加
</el-button>
</div>

View File

@ -9,24 +9,24 @@
<div v-if="!loading">
<div v-for="(item, index) in dataInfo" :key="index">
<el-form-item label="能力类别" prop="">
<el-select v-model="item.type" placeholder="请选择能力类别"
@change="(data) => filterSelect(data, item)" :disabled="disabledType">
<el-select v-model="item.type" placeholder="请选择能力类别" @change="(data) => filterSelect(data, item)"
:disabled="disabledType">
<el-option v-for="val in typeOptions" :key="val.value" :label="val.value" :value="val.value">
</el-option>
</el-select>
<el-select style="margin-left: 20px" v-model="item.resourceId" placeholder="请选择能力"
:disabled="disabledType">
<el-option v-for="val in item.abilityOptions" :key="val.id" :label="val.name" :value="val.id">
<el-select class="ability-input" style="margin-left: 20px;max-width:530px" v-model="item.resourceId"
placeholder="请选择能力" filterable :disabled="disabledType">
<el-option style="max-width:530px" v-for="val in item.abilityOptions" :key="val.id"
:label="val.name || '--'" :value="val.id">
</el-option>
</el-select>
<el-button style="margin-left:10px" @click="deleteItem(dataInfo, index)" type="danger" size="small"
v-if="!disabledType && dataInfo.length > 1">删除
</el-button>
<el-button style="margin-left:10px" size="small"
v-if="!disabledType && index == dataInfo.length - 1" @click="addItem(dataInfo, 0)"
type="primary">添加
</el-button>
</el-form-item>
<el-button style="margin-left:70px" size="small" v-if="!disabledType && index == dataInfo.length - 1"
@click="addItem(dataInfo, 0)" type="primary">添加
</el-button>
</div>
</div>
</div>
@ -51,9 +51,6 @@ export default {
data() {
return {
typeOptions: [
{
value: '',
},
{
value: '数据资源',
},
@ -71,7 +68,6 @@ export default {
},
],
dataInfo: [],
abilityArray: [],
abilityArrayCopy: [],
loading: false,
}
@ -139,13 +135,13 @@ export default {
//
getAbility() {
return new Promise((resolve, reject) => {
this.abilityArrayCopy = []
this.loading = true;
this.$http.get(`/resource/list`, {}).then(({ data: res }) => {
this.loading = false;
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.abilityArray = res.data || []
this.abilityArrayCopy = res.data || []
resolve(res)
}).catch((err) => {
@ -160,6 +156,8 @@ export default {
let selectArray = this.dataInfo.map(v => v.resourceId) || [];
//
item.abilityOptions = arr.filter(v => !selectArray.includes(v.id))
console.log('abilityOptions------------>', item.abilityOptions);
},
}
}
@ -180,4 +178,8 @@ export default {
width: 100%;
height: 100px;
}
</style>
.ability-input {
width: calc(100% - 300px);
}
</style>

View File

@ -16,7 +16,7 @@
v-if="!disabledType && dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button style="margin-left:120px" size="small" v-if="!disabledType && index == dataInfo.length - 1"
<el-button style="margin-left:70px" size="small" v-if="!disabledType && index == dataInfo.length - 1"
@click="addItem" type="primary">添加
</el-button>
</div>