- filterSelect(data, item)" :disabled="disabledType">
+ filterSelect(data, item)"
+ :disabled="disabledType">
-
-
+
+
删除
- 添加
-
+ 添加
+
@@ -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;
}
-
\ No newline at end of file
+
+.ability-input {
+ width: calc(100% - 300px);
+}
+
diff --git a/back/src/views/modules/ability/components/scene-use-step.vue b/back/src/views/modules/ability/components/scene-use-step.vue
index f81fa7d6..b2f8a669 100644
--- a/back/src/views/modules/ability/components/scene-use-step.vue
+++ b/back/src/views/modules/ability/components/scene-use-step.vue
@@ -16,7 +16,7 @@
v-if="!disabledType && dataInfo.length > 1">删除
-