Commit 4d2c0405 authored by “yiyousong”'s avatar “yiyousong”

pref:修改新增应用

parent 7560dca7
......@@ -53,6 +53,10 @@
/>
<span v-else>--</span>
</template>
<!-- 主题类型 -->
<template slot="appThemeName" slot-scope="text">
{{ filterItems(text.appThemeName, dict.appThemeName) }}
</template>
<!-- 简介 -->
<template slot="summary" slot-scope="text">
<span :title="text.summary">{{
......@@ -94,6 +98,7 @@
<!-- 新增应用 -->
<AddApp
ref="AddApp"
:dict="dict"
@success="getAppList"
:AddVisible.sync="AddVisible"
:title="title"
......@@ -138,7 +143,7 @@ const columns = [
{
title: "应用主题",
ellipsis: true,
dataIndex: "appThemeName",
scopedSlots: { customRender: "appThemeName" },
},
{
title: "应用简介",
......@@ -186,6 +191,7 @@ export default {
AddVisible: false,
title: "新增应用",
siteVisible: false,
dict: {}, // 字典
};
},
// 详情页返回不刷新数据
......@@ -210,7 +216,8 @@ export default {
type: 2,
});
this.loading = false;
let { data, total } = res.data.data;
let { data, total, dict } = res.data.data;
this.dict = dict;
if (res.data.code === 1) {
if (!data.length && this.current > 1) {
this.current -= 1;
......@@ -328,6 +335,16 @@ export default {
this.getAppList();
}
},
// 过滤表格数据
filterItems(key, dict = {}) {
let val = "";
Object.keys(dict).forEach((keys) => {
if (key == keys) {
val = dict[keys];
}
});
return val;
},
},
};
</script>
......
......@@ -53,6 +53,10 @@
/>
<span v-else>--</span>
</template>
<!-- 主题类型 -->
<template slot="appThemeName" slot-scope="text">
{{ filterItems(text.appThemeName, dict.appThemeName) }}
</template>
<!-- 简介 -->
<template slot="summary" slot-scope="text">
<span :title="text.summary">{{
......@@ -94,6 +98,7 @@
<!-- 新增应用 -->
<AddApp
ref="AddApp"
:dict="dict"
@success="getAppList"
:AddVisible.sync="AddVisible"
:title="title"
......@@ -138,7 +143,7 @@ const columns = [
{
title: "应用主题",
ellipsis: true,
dataIndex: "appThemeName",
scopedSlots: { customRender: "appThemeName" },
},
{
title: "应用简介",
......@@ -186,6 +191,7 @@ export default {
AddVisible: false,
title: "新增应用",
siteVisible: false,
dict: {}, // 字典
};
},
// 详情页返回不刷新数据
......@@ -210,7 +216,8 @@ export default {
type: 1,
});
this.loading = false;
let { data, total } = res.data.data;
let { data, total, dict } = res.data.data;
this.dict = dict;
if (res.data.code === 1) {
if (!data.length && this.current > 1) {
this.current -= 1;
......@@ -328,6 +335,16 @@ export default {
this.getAppList();
}
},
// 过滤表格数据
filterItems(key, dict = {}) {
let val = "";
Object.keys(dict).forEach((keys) => {
if (key == keys) {
val = dict[keys];
}
});
return val;
},
},
};
</script>
......
......@@ -22,11 +22,15 @@
<a-input v-model="form.appCode" placeholder="请输入应用编码" />
</a-form-model-item>
<a-form-model-item label="应用主题" prop="appThemeName">
<a-input v-model="form.appThemeName" placeholder="请输入应用主题" />
<!-- <a-select v-model="form.appThemeName" placeholder="请选择应用主题">
<a-select-option value="shanghai"> Zone one </a-select-option>
<a-select-option value="beijing"> Zone two </a-select-option>
</a-select> -->
<a-select v-model="form.appThemeName" placeholder="请选择应用主题">
<a-select-option
v-for="(v, key) in dict.appThemeName"
:value="key"
:key="key"
>
{{ v }}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="应用图标" prop="appIconPath">
<a-upload
......@@ -169,6 +173,13 @@ export default {
required: true,
default: false,
},
dict: {
type: Object,
required: true,
default: () => {
return {};
},
},
},
data() {
return {
......@@ -187,7 +198,7 @@ export default {
appName: "", // 应用名称
appCode: "", // 应用编码
appIconPath: "", // 应用图标
appThemeName: "", // 应用主题名称
appThemeName: undefined, // 应用主题名称
type: "", // 类型(1.终端应用,2.移动端应用)
appType: 1, // 类型(1.应用程序,2.url)
shelves: 0,
......
......@@ -182,11 +182,13 @@ export default {
methods: {
// 获取参数列表
async getSystemParameterList() {
this.loading = true;
let res = await getSystemParameterList({
page: this.current,
size: this.size,
name: `%${this.searchValue}%`,
});
this.loading = false;
if (res.data.code == 1) {
let { total, data, dict } = res.data.data;
this.dict = dict;
......
......@@ -112,8 +112,8 @@ export default {
});
this.loading = false;
if (res.data.code == 1) {
let { result, total } = res.data.data;
this.tableData = result;
let { data, total } = res.data.data;
this.tableData = data;
this.total = total;
}
},
......
......@@ -169,16 +169,19 @@ export default {
methods: {
// 获取参数列表
async getSystemTaskList() {
this.loading = true;
let res = await getSystemTaskList({
page: this.current,
size: this.size,
name: `%${this.searchValue}%`,
});
this.loading = false;
if (res.data.code == 1) {
let { total, data, dict } = res.data.data;
this.dict = dict;
if (!data.length && this.current > 1) {
this.current -= 1;
this.getSystemTaskList();
}
this.total = total;
this.tableData = data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment