Commit ed26c942 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/reg' into reg

parents 4c909922 d820e240
...@@ -96,6 +96,12 @@ ...@@ -96,6 +96,12 @@
<span class="primary pointer" @click="handlePreview(text.id)" <span class="primary pointer" @click="handlePreview(text.id)"
>预览</span >预览</span
> >
<span
class="delete pointer"
v-permission="[1]"
@click="handleDel(text.id)"
>删除</span
>
</a-space> </a-space>
</template> </template>
</a-table> </a-table>
...@@ -118,6 +124,7 @@ import { ...@@ -118,6 +124,7 @@ import {
usedVersion, usedVersion,
previewVersion, previewVersion,
getCategoryList, getCategoryList,
deleteVersion,
} from "@/services/market"; } from "@/services/market";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
...@@ -270,6 +277,33 @@ export default { ...@@ -270,6 +277,33 @@ export default {
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, "_blank");
} }
}, },
// 删除
handleDel(id) {
let _this = this;
_this.$confirm({
title: "系统提示",
content: "删除不可恢复,确定要删除吗?",
okText: "确定",
okType: "danger",
cancelText: "取消",
centered: true,
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
let res = await deleteVersion({ id });
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
_this.getVersions();
}
},
onCancel() {
console.log("Cancel");
},
});
},
// 翻页 // 翻页
handleChange(cur) { handleChange(cur) {
this.current = cur; this.current = cur;
...@@ -353,4 +387,4 @@ export default { ...@@ -353,4 +387,4 @@ export default {
/deep/.ant-form-item { /deep/.ant-form-item {
align-items: flex-start; align-items: flex-start;
} }
</style> </style>
\ No newline at end of file
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
<a-space> <a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button> <a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button> <a-button type="primary" @click="handleClone"> 克隆 </a-button>
<a-button type="primary" @click="handleTheme">
批量关联应用主题
</a-button>
<a-button v-permission="[1]" type="danger" @click="handleDelAll">
批量删除
</a-button>
</a-space> </a-space>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
...@@ -67,7 +73,7 @@ ...@@ -67,7 +73,7 @@
</template> </template>
<!-- 版本 --> <!-- 版本 -->
<template slot="version" slot-scope="text"> <template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }} {{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
...@@ -91,7 +97,7 @@ ...@@ -91,7 +97,7 @@
> >
<span <span
class="delete pointer" class="delete pointer"
:class="{ unDelete: text.distribute }" :class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)" @click="handleDel(text.distribute, text.id)"
>删除</span >删除</span
> >
...@@ -114,22 +120,30 @@ ...@@ -114,22 +120,30 @@
:appList="selectedRowKeys" :appList="selectedRowKeys"
:siteVisible.sync="siteVisible" :siteVisible.sync="siteVisible"
></CheckSite> ></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div> </div>
</template> </template>
<script> <script>
import YSwitch from "../../../../components/yswitch/YSwitch.vue"; import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddApp from "../modal/AddApp.vue"; import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import { import {
getAppList, getAppList,
deleteApp, deleteApp,
saveApp, saveApp,
getCategoryList, getCategoryList,
} from "@/services/market"; } from "@/services/market";
import { mapMutations } from "vuex";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -184,6 +198,7 @@ export default { ...@@ -184,6 +198,7 @@ export default {
YSwitch, YSwitch,
AddApp, AddApp,
CheckSite, CheckSite,
ChangeThem,
}, },
data() { data() {
return { return {
...@@ -198,32 +213,21 @@ export default { ...@@ -198,32 +213,21 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
pageSizeOptions, pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据 selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false, AddVisible: false,
title: "新增应用", title: "新增应用",
siteVisible: false, siteVisible: false,
themVisible: false,
dict: {}, // 字典 dict: {}, // 字典
categoryList: [], // 应用分类列表 categoryList: [], // 应用分类列表
}; };
}, },
// 进入路由前
// beforeRouteEnter(to, from, text) { computed: {
// if (from.path === "/appmarket/appdetails") { ...mapGetters("site", ["userInfo"]),
// to.meta.isBack = true; },
// } else {
// to.meta.isBack = false;
// }
// text();
// },
// // 详情页返回不刷新数据
// activated() {
// if (!this.$route.meta.isBack) {
// Object.assign(this.$data, this.$options.data());
// this.getAppList();
// } else {
// this.$route.meta.isBack = false;
// }
// },
created() { created() {
this.getCategoryList(); this.getCategoryList();
this.getAppList(); this.getAppList();
...@@ -232,7 +236,6 @@ export default { ...@@ -232,7 +236,6 @@ export default {
...mapMutations("site", ["SET_appDict"]), ...mapMutations("site", ["SET_appDict"]),
// 获取分类列表 // 获取分类列表
async getCategoryList() { async getCategoryList() {
this.loading = true;
let res = await getCategoryList({ let res = await getCategoryList({
page: 1, page: 1,
size: -1, size: -1,
...@@ -243,6 +246,7 @@ export default { ...@@ -243,6 +246,7 @@ export default {
this.categoryList = data; this.categoryList = data;
} }
}, },
// 获取应用列表 // 获取应用列表
async getAppList() { async getAppList() {
this.loading = true; this.loading = true;
...@@ -297,8 +301,17 @@ export default { ...@@ -297,8 +301,17 @@ export default {
this.getAppList(); this.getAppList();
}, },
// 勾选表格 // 勾选表格
onSelectChange(keys) { onSelectChange(keys, rows) {
this.selectedRowKeys = keys; this.selectedRowKeys = keys;
this.selectedAppList = [...this.selectedAppList, ...rows];
let map = new Map();
this.selectedAppList = this.selectedAppList
.filter((v) => {
return !map.has(v.id) && map.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((item) => item == v.id);
});
}, },
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
...@@ -306,6 +319,16 @@ export default { ...@@ -306,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row); this.$refs.AddApp.onEdit(row);
this.AddVisible = true; this.AddVisible = true;
}, },
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看 // 查看
handleCheck(id) { handleCheck(id) {
this.$router.push({ this.$router.push({
...@@ -317,7 +340,7 @@ export default { ...@@ -317,7 +340,7 @@ export default {
}, },
// 删除 // 删除
handleDel(distribute, id) { handleDel(distribute, id) {
if (distribute) { if (this.userInfo.id != 1 && distribute) {
this.$confirm({ this.$confirm({
title: "拒绝删除", title: "拒绝删除",
content: "该应用正在使用中。", content: "该应用正在使用中。",
...@@ -359,6 +382,17 @@ export default { ...@@ -359,6 +382,17 @@ export default {
}, },
}); });
}, },
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(0, ids);
},
// 克隆成功 // 克隆成功
cloneSuccess() { cloneSuccess() {
this.selectedRowKeys = []; this.selectedRowKeys = [];
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
<a-space> <a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </a-button> <a-button type="primary" @click="handleAdd"> 新增应用 </a-button>
<a-button type="primary" @click="handleClone"> 克隆 </a-button> <a-button type="primary" @click="handleClone"> 克隆 </a-button>
<a-button type="primary" @click="handleTheme">
批量关联应用主题
</a-button>
<a-button v-permission="[1]" type="danger" @click="handleDelAll">
批量删除
</a-button>
</a-space> </a-space>
<a-input-search <a-input-search
style="width: 300px" style="width: 300px"
...@@ -67,7 +73,7 @@ ...@@ -67,7 +73,7 @@
</template> </template>
<!-- 版本 --> <!-- 版本 -->
<template slot="version" slot-scope="text"> <template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }} {{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template> </template>
<!-- 类型 --> <!-- 类型 -->
<template slot="appType" slot-scope="text"> <template slot="appType" slot-scope="text">
...@@ -91,7 +97,7 @@ ...@@ -91,7 +97,7 @@
> >
<span <span
class="delete pointer" class="delete pointer"
:class="{ unDelete: text.distribute }" :class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)" @click="handleDel(text.distribute, text.id)"
>删除</span >删除</span
> >
...@@ -114,6 +120,13 @@ ...@@ -114,6 +120,13 @@
:appList="selectedRowKeys" :appList="selectedRowKeys"
:siteVisible.sync="siteVisible" :siteVisible.sync="siteVisible"
></CheckSite> ></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div> </div>
</template> </template>
...@@ -121,6 +134,7 @@ ...@@ -121,6 +134,7 @@
import YSwitch from "../../../../components/yswitch/YSwitch.vue"; import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import AddApp from "../modal/AddApp.vue"; import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue"; import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import { import {
getAppList, getAppList,
deleteApp, deleteApp,
...@@ -128,7 +142,7 @@ import { ...@@ -128,7 +142,7 @@ import {
getCategoryList, getCategoryList,
} from "@/services/market"; } from "@/services/market";
import local from "@/utils/local"; import local from "@/utils/local";
import { mapMutations } from "vuex"; import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [ const columns = [
{ {
...@@ -184,6 +198,7 @@ export default { ...@@ -184,6 +198,7 @@ export default {
YSwitch, YSwitch,
AddApp, AddApp,
CheckSite, CheckSite,
ChangeThem,
}, },
data() { data() {
return { return {
...@@ -198,15 +213,21 @@ export default { ...@@ -198,15 +213,21 @@ export default {
size: 10, size: 10,
total: 0, total: 0,
pageSizeOptions, pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据 selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false, AddVisible: false,
title: "新增应用", title: "新增应用",
siteVisible: false, siteVisible: false,
themVisible: false,
dict: {}, // 字典 dict: {}, // 字典
categoryList: [], // 应用分类列表 categoryList: [], // 应用分类列表
}; };
}, },
computed: {
...mapGetters("site", ["userInfo"]),
},
created() { created() {
this.getCategoryList(); this.getCategoryList();
this.getAppList(); this.getAppList();
...@@ -280,8 +301,17 @@ export default { ...@@ -280,8 +301,17 @@ export default {
this.getAppList(); this.getAppList();
}, },
// 勾选表格 // 勾选表格
onSelectChange(keys) { onSelectChange(keys, rows) {
this.selectedRowKeys = keys; this.selectedRowKeys = keys;
this.selectedAppList = [...this.selectedAppList, ...rows];
let map = new Map();
this.selectedAppList = this.selectedAppList
.filter((v) => {
return !map.has(v.id) && map.set(v.id, 1);
})
.filter((v) => {
return this.selectedRowKeys.some((item) => item == v.id);
});
}, },
// 编辑 // 编辑
handleEdit(row) { handleEdit(row) {
...@@ -289,6 +319,16 @@ export default { ...@@ -289,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row); this.$refs.AddApp.onEdit(row);
this.AddVisible = true; this.AddVisible = true;
}, },
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看 // 查看
handleCheck(id) { handleCheck(id) {
this.$router.push({ this.$router.push({
...@@ -301,7 +341,7 @@ export default { ...@@ -301,7 +341,7 @@ export default {
}, },
// 删除 // 删除
handleDel(distribute, id) { handleDel(distribute, id) {
if (distribute) { if (this.userInfo.id != 1 && distribute) {
this.$confirm({ this.$confirm({
title: "拒绝删除", title: "拒绝删除",
content: "该应用正在使用中。", content: "该应用正在使用中。",
...@@ -343,6 +383,17 @@ export default { ...@@ -343,6 +383,17 @@ export default {
}, },
}); });
}, },
// 批量删除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(0, ids);
},
// 克隆成功 // 克隆成功
cloneSuccess() { cloneSuccess() {
this.selectedRowKeys = []; this.selectedRowKeys = [];
......
<template>
<div>
<a-modal v-model="Visible" title="请选择主题">
<a-form-model
ref="form"
:model="form"
:rules="rules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="应用" prop="appThemeName">
<a-select placeholder="请选择主题" v-model="form.appThemeName">
<a-select-option
v-for="v in themList"
:key="v.id"
:value="'' + v.id"
>
{{ v.categoryName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
<div slot="footer">
<a-space size="middle">
<a-button @click="handleCancel">取消</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</a-space>
</div>
</a-modal>
</div>
</template>
<script>
import { batchSave } from "@/services/market";
export default {
props: {
themVisible: {
type: Boolean,
required: true,
default: false,
},
themList: {
type: Array,
required: true,
default: () => [],
},
appList: {
type: Array,
required: true,
default: () => [],
},
},
data() {
return {
form: {
appThemeName: undefined,
},
rules: {
appThemeName: [
{ required: true, message: "请选择主题", trigger: "change" },
],
},
};
},
computed: {
Visible: {
get() {
return this.themVisible;
},
set(val) {
this.$emit("update:themVisible", val);
},
},
},
methods: {
// 保存
handleOk() {
this.$refs.form.validate(async (valid) => {
if (valid) {
let arr = this.appList.map((v) => {
return {
...v,
appThemeName: this.form.appThemeName,
};
});
let res = await batchSave(arr);
let { code, msg } = res.data;
if (code == 1) {
this.$message.success(msg);
this.$emit("edit");
this.handleCancel();
}
}
});
},
// 取消
handleCancel() {
this.$refs.form.resetFields();
this.Visible = false;
},
},
};
</script>
<style lang="less" scoped></style>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
}" }"
:columns="columns" :columns="columns"
:data-source="siteBusinessList" :data-source="siteBusinessList"
:rowKey="(record) => record.id" :rowKey="(record) => record.businessId"
:row-selection="{ :row-selection="{
selectedRowKeys: rowKeys, selectedRowKeys: rowKeys,
onChange: handleChange, onChange: handleChange,
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<script> <script>
import { getSiteBusinessList } from "@/services/business"; import { getSiteBusinessList } from "@/services/business";
import { addBusinessToWindow } from "@/services/dept"; import { addBusinessToWindow } from "@/services/dept";
import { extractTree } from "@/utils/util"; // import { extractTree } from "@/utils/util";
import local from "@/utils/local"; import local from "@/utils/local";
const columns = [ const columns = [
{ {
...@@ -137,12 +137,7 @@ export default { ...@@ -137,12 +137,7 @@ export default {
await this.getSiteBusinessList(); await this.getSiteBusinessList();
this.formData = info; this.formData = info;
if (info.businessIds.length) { if (info.businessIds.length) {
let arr = extractTree(this.siteBusinessList, "children").map((v) => this.rowKeys = info.businessIds;
Number(v.id)
);
this.rowKeys = arr.filter((v) => {
return info.businessIds.some((val) => v == val);
});
} else { } else {
this.rowKeys = []; this.rowKeys = [];
} }
...@@ -193,17 +188,17 @@ export default { ...@@ -193,17 +188,17 @@ export default {
onSelectRow(record, selected) { onSelectRow(record, selected) {
if (selected && record.children && record.children.length) { if (selected && record.children && record.children.length) {
record.children.forEach((v) => { record.children.forEach((v) => {
this.rowKeys = [...new Set([...this.rowKeys, v.id])]; this.rowKeys = [...new Set([...this.rowKeys, v.businessId])];
}); });
} else if (!selected && record.children && record.children.length) { } else if (!selected && record.children && record.children.length) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id); this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
record.children.forEach((v) => { record.children.forEach((v) => {
this.rowKeys = this.rowKeys.filter((val) => val != v.id); this.rowKeys = this.rowKeys.filter((val) => val != v.businessId);
}); });
} else if (selected && record.parentId) { } else if (selected && record.parentId) {
this.rowKeys = [...new Set([...this.rowKeys, record.parentId])]; this.rowKeys = [...new Set([...this.rowKeys, record.parentId])];
} else if (!selected) { } else if (!selected) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id); this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
} }
}, },
// 保存窗口关联业务 // 保存窗口关联业务
...@@ -236,4 +231,4 @@ export default { ...@@ -236,4 +231,4 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
\ No newline at end of file
...@@ -16,10 +16,16 @@ ...@@ -16,10 +16,16 @@
@click="handleSync(siteData[0].id)" @click="handleSync(siteData[0].id)"
>同步数据</a-button >同步数据</a-button
> >
<a-button type="primary" @click="editSiteInfo(siteData[0])" <a-button
v-permission="[1]"
type="primary"
@click="editSiteInfo(siteData[0])"
>编辑</a-button >编辑</a-button
> >
<a-button type="danger" @click="deleteSite(siteData[0].id, 0)" <a-button
v-permission="[1]"
type="danger"
@click="deleteSite(siteData[0].id, 0)"
>删除</a-button >删除</a-button
> >
</a-space> </a-space>
......
...@@ -55,6 +55,7 @@ import SelfService from "../selfservice/SelfService.vue"; ...@@ -55,6 +55,7 @@ import SelfService from "../selfservice/SelfService.vue";
import DesSelfService from "../desSelfservice/DesSelfService.vue"; import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue"; import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue"; import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { filterItems } from "@/utils"; import { filterItems } from "@/utils";
export default { export default {
...@@ -71,6 +72,7 @@ export default { ...@@ -71,6 +72,7 @@ export default {
DesSelfService, DesSelfService,
SignDevicekin, SignDevicekin,
InfoDisSkin, InfoDisSkin,
DefaultShow,
}, },
props: {}, props: {},
data() { data() {
...@@ -121,6 +123,8 @@ export default { ...@@ -121,6 +123,8 @@ export default {
case "xxgk": case "xxgk":
str = "InfoDisSkin"; str = "InfoDisSkin";
break; break;
default:
str = "DefaultShow";
} }
return str; return str;
}, },
......
<template>
<div class="skin-box">
<!-- 1920*1080 -->
<div
:id="componentsId"
class="across-skin"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
></div>
<!-- 竖版 1080*1920 -->
<div
class="vertical-skin"
:id="componentsId"
v-else-if="imageResolution === '2'"
:style="{
background: filterItem('1', 0),
}"
></div>
<!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty
:image="require('../../../../assets/img/original.png')"
:image-style="{
height: '80px',
}"
>
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty>
</div>
</div>
</template>
<script>
export default {
props: {
// imgItem: {
// type: Array,
// required: true,
// default: () => {
// return [];
// },
// },
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
componentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_IMG_URL,
};
},
methods: {
// 过滤属性类型
filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
if (arr.length) {
return this.filterValueType(arr[index]);
} else {
return "";
}
},
// 过滤属性值类型
filterValueType(info = {}) {
let value = "";
if (info.fieldType !== "" && info.fieldType === "1" && info.fieldValue) {
value = info.fieldValue;
} else if (
info.fieldType !== "" &&
info.fieldType === "2" &&
info.fieldValue
) {
value = `url(${this.api + info.fieldValue})`;
}
return value;
},
// 过滤导航
filterNav(type) {
let arr = [];
arr = this.skinFieldList.filter((v) => {
return v.remark == type;
});
return arr;
},
},
};
</script>
<style lang="less" scoped>
.across-skin {
width: 1000px;
height: 562.5px;
color: #fff;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
}
.vertical-skin {
height: 1000px;
width: 562px;
padding: 10px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 100% 100% !important;
}
</style>
...@@ -196,6 +196,7 @@ import SelfService from "../selfservice/SelfService.vue"; ...@@ -196,6 +196,7 @@ import SelfService from "../selfservice/SelfService.vue";
import DesSelfService from "../desSelfservice/DesSelfService.vue"; import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue"; import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue"; import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { uploadFile, skinSave, getTemplateList } from "@/services/surface"; import { uploadFile, skinSave, getTemplateList } from "@/services/surface";
import html2canvas from "html2canvas"; import html2canvas from "html2canvas";
import { Empty } from "ant-design-vue"; import { Empty } from "ant-design-vue";
...@@ -215,6 +216,7 @@ export default { ...@@ -215,6 +216,7 @@ export default {
DesSelfService, DesSelfService,
SignDevicekin, SignDevicekin,
InfoDisSkin, InfoDisSkin,
DefaultShow,
}, },
props: { props: {
isShow: { isShow: {
...@@ -312,6 +314,8 @@ export default { ...@@ -312,6 +314,8 @@ export default {
case "xxgk": case "xxgk":
str = "InfoDisSkin"; str = "InfoDisSkin";
break; break;
default:
str = "DefaultShow";
} }
return str; return str;
}, },
......
...@@ -285,6 +285,7 @@ module.exports = { ...@@ -285,6 +285,7 @@ module.exports = {
list: `${BASE_URL}/base/app/list`, list: `${BASE_URL}/base/app/list`,
info: `${BASE_URL}/base/app/info`, info: `${BASE_URL}/base/app/info`,
save: `${BASE_URL}/base/app/save`, save: `${BASE_URL}/base/app/save`,
batchSave: `${BASE_URL}/base/app/batchSave`,
delete: `${BASE_URL}/base/app/delete`, delete: `${BASE_URL}/base/app/delete`,
distribute: `${BASE_URL}/base/app/appDistribute`, distribute: `${BASE_URL}/base/app/appDistribute`,
clone: `${BASE_URL}/base/app/cloneAppsBySites`, clone: `${BASE_URL}/base/app/cloneAppsBySites`,
......
...@@ -27,6 +27,10 @@ export async function getAppInfo(data) { ...@@ -27,6 +27,10 @@ export async function getAppInfo(data) {
export async function saveApp(data) { export async function saveApp(data) {
return request(App.save, METHOD.POST, data); return request(App.save, METHOD.POST, data);
} }
// 新增,修改应用(批量)
export async function batchSave(data) {
return request(App.batchSave, METHOD.POST, data);
}
// 删除应用 // 删除应用
export async function deleteApp(data) { export async function deleteApp(data) {
return request(App.delete, METHOD.GET, data); return request(App.delete, METHOD.GET, data);
......
# 开发环境配置 # 开发环境配置
NODE_ENV = development NODE_ENV = development
# VUE_APP_API_BASE_URL=http://8.136.255.30:11078 # VUE_APP_API_BASE_URL=http://8.136.255.30:11078
VUE_APP_API_BASE_URL=http://192.168.0.124:11078 VUE_APP_API_BASE_URL=http://192.168.0.98:11078
#图片显示拼接 #图片显示拼接
# VUE_APP_API_IMG_URL=http://8.136.255.30:11078/ # VUE_APP_API_IMG_URL=http://8.136.255.30:11078/
VUE_APP_API_IMG_URL=http://192.168.0.124:11078/ VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
#余林 #余林
# VUE_APP_API_PHP_URL=http://8.136.255.30:8090 # VUE_APP_API_PHP_URL=http://8.136.255.30:8090
VUE_APP_API_PHP_URL=http://192.168.0.124:8090 VUE_APP_API_PHP_URL=http://192.168.0.98:8090
#宜宾 #宜宾
#VUE_APP_API_BASE_URL=http://10.12.185.213:11072 #VUE_APP_API_BASE_URL=http://10.12.185.213:11072
...@@ -18,7 +18,7 @@ export function changePassword(params) { ...@@ -18,7 +18,7 @@ export function changePassword(params) {
} }
// 1.2.5. 查询门户口号 // 1.2.5. 查询门户口号
export function getSlogan(params) { export function getSlogan(params) {
return http.post(`${baseURL}/base/param/key?key=title`); return http.post(`${baseURL}/base/param/key?key=${params}`);
} }
// 管理员修改密码 // 管理员修改密码
export function editPassword(params) { export function editPassword(params) {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<audio <audio
v-else-if="previeData.type === 'audio'" v-else-if="previeData.type === 'audio'"
controls controls
src="@/assets/images/out.mp3" :src="previeData.url"
></audio> ></audio>
</div> </div>
<a-icon @click="Visible = false" type="close-circle" /> <a-icon @click="Visible = false" type="close-circle" />
......
<template> <template>
<div class="login h-full w-full"> <div
class="login h-full w-full"
:style="{ backgroundImage: `url(${imgUrl})` }"
>
<div class="main h-full w-full flex items-center justify-between"> <div class="main h-full w-full flex items-center justify-between">
<div class="slogan"> <div class="slogan">
<p class="slogan-text slogan-text-1 mb-12">{{ sloganTitle }}</p> <p class="slogan-text slogan-text-1 mb-12">{{ sloganTitle }}</p>
...@@ -312,6 +315,7 @@ export default { ...@@ -312,6 +315,7 @@ export default {
{ required: true, validator: changePwdAgain, trigger: "blur" }, { required: true, validator: changePwdAgain, trigger: "blur" },
], ],
}, },
imgUrl: "",
}; };
}, },
computed: { computed: {
...@@ -330,7 +334,17 @@ export default { ...@@ -330,7 +334,17 @@ export default {
methods: { methods: {
...mapMutations("user", ["set_token", "SET_USERDATA", "set_siteList"]), ...mapMutations("user", ["set_token", "SET_USERDATA", "set_siteList"]),
getTitle() { getTitle() {
getSlogan().then((res) => { getSlogan("signImg").then((res) => {
if (res.code == 1) {
res.data
? (this.imgUrl = res.data)
: (this.imgUrl = require("@/assets/images/login_bg.jpg"));
} else {
this.imgUrl = require("@/assets/images/login_bg.jpg");
}
});
getSlogan("title").then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.sloganTitle = res.data; this.sloganTitle = res.data;
localStorage.setItem("sloganTitle", res.data); localStorage.setItem("sloganTitle", res.data);
...@@ -492,7 +506,7 @@ export default { ...@@ -492,7 +506,7 @@ export default {
--input-height: 50px; --input-height: 50px;
--input-border-color: rgba(238, 238, 238, 1); --input-border-color: rgba(238, 238, 238, 1);
--time: 1.5s; --time: 1.5s;
background: url("@/assets/images/login_bg.jpg"); // background: url("@/assets/images/login_bg.jpg");
background-size: 100% auto; background-size: 100% auto;
animation: bg-roll 150s cubic-bezier(0.21, 0.07, 0.88, 1.02) infinite; animation: bg-roll 150s cubic-bezier(0.21, 0.07, 0.88, 1.02) infinite;
.main { .main {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
class="img-title mb-[42px]" class="img-title mb-[42px]"
src="@/assets/images/siteArrange/title.png" src="@/assets/images/siteArrange/title.png"
/> --> /> -->
<h1 class="slogan_title">{{ sloganTitle }}</h1>
<div class="slogan">建设高效便民、智慧泛在的智慧政务大厅</div> <div class="slogan">建设高效便民、智慧泛在的智慧政务大厅</div>
</div> </div>
<!-- 站点 --> <!-- 站点 -->
...@@ -46,7 +45,11 @@ ...@@ -46,7 +45,11 @@
v-for="(v, i) in collectList" v-for="(v, i) in collectList"
:key="'' + v.id + i" :key="'' + v.id + i"
> >
<div class="item-logo cursor-pointer" @click="openWindow(v)"> <div
class="item-logo cursor-pointer"
@click="openWindow($event, v, 'click')"
@contextmenu="openWindow($event, v)"
>
<img <img
class="w-full h-full object-contain" class="w-full h-full object-contain"
:src="api + v.modelIcon" :src="api + v.modelIcon"
...@@ -92,7 +95,11 @@ ...@@ -92,7 +95,11 @@
v-for="item in v.list" v-for="item in v.list"
:key="item.id" :key="item.id"
> >
<div class="item-logo cursor-pointer" @click="openWindow(item)"> <div
class="item-logo cursor-pointer"
@click="openWindow($event, item, 'click')"
@contextmenu="openWindow($event, item)"
>
<img <img
class="w-full h-full object-contain" class="w-full h-full object-contain"
:src="api + item.modelIcon" :src="api + item.modelIcon"
...@@ -118,7 +125,6 @@ import { mapState } from "vuex"; ...@@ -118,7 +125,6 @@ import { mapState } from "vuex";
export default { export default {
data() { data() {
return { return {
sloganTitle:'',
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
siteId: Storage.get(2, "siteId"), siteId: Storage.get(2, "siteId"),
arr: [], arr: [],
...@@ -137,7 +143,6 @@ export default { ...@@ -137,7 +143,6 @@ export default {
}, },
created() { created() {
this.sloganTitle=localStorage.getItem('sloganTitle')
this.getCollect(); this.getCollect();
this.appsListInterface(); this.appsListInterface();
}, },
...@@ -160,7 +165,7 @@ export default { ...@@ -160,7 +165,7 @@ export default {
this.siteModelList = data; this.siteModelList = data;
} }
}, },
openWindow(row) { async openWindow(event, row, type) {
let siteid = Storage.get(2, "siteId") || 0; let siteid = Storage.get(2, "siteId") || 0;
let siteName = Storage.get(2, "siteName") || ""; let siteName = Storage.get(2, "siteName") || "";
let userInfo = JSON.stringify({ let userInfo = JSON.stringify({
...@@ -169,13 +174,48 @@ export default { ...@@ -169,13 +174,48 @@ export default {
}); });
let { modelUrl, modelName, modelIcon } = row; let { modelUrl, modelName, modelIcon } = row;
let path = this.$route.path; let path = this.$route.path;
modelName = encodeURI(modelName); let compileModelName = encodeURI(modelName);
window.open( let params = `?token=${this.token}&siteid=${siteid}&siteName=${encodeURI(
`${modelUrl}?token=${this.token}&siteid=${siteid}&siteName=${encodeURI( siteName
siteName )}&userInfo=${userInfo}&sysName=${compileModelName}&sysLogo=${modelIcon}&path=${path}`;
)}&userInfo=${userInfo}&sysName=${modelName}&sysLogo=${modelIcon}&path=${path}`, if (type === "click") {
"_blank" window.open(`${modelUrl}${params}`, "_blank");
); return;
}
if (this.userData.admin || this.userData.id == 1) {
event.preventDefault();
// let redirectUrl = "";
// let hash = "";
// let redirect = await this.getFinalRedirect(modelUrl);
// if (!modelUrl.includes("http")) {
// let index = modelUrl.indexOf("/");
// hash = modelUrl.slice(index + 1);
// }
// if (redirect) {
// redirectUrl = redirect + hash;
// } else {
// redirectUrl = modelUrl;
// }
this.$notification.open({
message: "跳转链接",
key: 1,
duration: null,
description: (
<div>
<div class="notif-name">{modelName}-完整链接:</div>
<div>{modelUrl + params}</div>
<div class="notif-name">链接参数:</div>
<div>{params}</div>
</div>
),
style: {
"word-break": "break-all",
},
icon: <a-icon type="smile" style="color: #108ee9" />,
});
}
}, },
handleJoin() { handleJoin() {
...@@ -233,15 +273,36 @@ export default { ...@@ -233,15 +273,36 @@ export default {
} }
return false; return false;
}, },
// 获取重定向地址
// getFinalRedirect(url) {
// return fetch(url, { method: "GET", redirect: "follow" })
// .then((response) => {
// if (!response.ok) {
// throw new Error("Network response was not ok");
// }
// return response.url;
// })
// .catch((error) => {
// console.error("Error:", error);
// return null;
// });
// },
}, },
}; };
</script> </script>
<style>
.notif-name {
font-size: 14px;
font-weight: 600;
}
</style>
<style lang="less" scoped> <style lang="less" scoped>
.station { .station {
background: url("@/assets/images/siteArrange/bg_3.jpg") no-repeat; background: url("@/assets/images/siteArrange/bg_3.jpg") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
overflow: hidden; overflow: hidden;
.del-box { .del-box {
width: 100%; width: 100%;
height: 150px; height: 150px;
...@@ -260,13 +321,6 @@ export default { ...@@ -260,13 +321,6 @@ export default {
top: 0px; top: 0px;
} }
.title { .title {
.slogan_title {
font-size: 65px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #ffffff;
margin-bottom: 30px;
}
.slogan { .slogan {
font-size: 39px; font-size: 39px;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
......
...@@ -16,6 +16,10 @@ module.exports = defineConfig({ ...@@ -16,6 +16,10 @@ module.exports = defineConfig({
"^/api": "", "^/api": "",
}, },
}, },
"/file": {
target: process.env.VUE_APP_API_BASE_URL,
changeOrigin: true,
},
}, },
}, },
......
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