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

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

parents 4c909922 d820e240
......@@ -96,6 +96,12 @@
<span class="primary pointer" @click="handlePreview(text.id)"
>预览</span
>
<span
class="delete pointer"
v-permission="[1]"
@click="handleDel(text.id)"
>删除</span
>
</a-space>
</template>
</a-table>
......@@ -118,6 +124,7 @@ import {
usedVersion,
previewVersion,
getCategoryList,
deleteVersion,
} from "@/services/market";
import CheckSite from "../modal/CheckSite.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
......@@ -270,6 +277,33 @@ export default {
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) {
this.current = cur;
......@@ -353,4 +387,4 @@ export default {
/deep/.ant-form-item {
align-items: flex-start;
}
</style>
\ No newline at end of file
</style>
......@@ -4,6 +4,12 @@
<a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </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-input-search
style="width: 300px"
......@@ -67,7 +73,7 @@
</template>
<!-- 版本 -->
<template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }}
{{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template>
<!-- 类型 -->
<template slot="appType" slot-scope="text">
......@@ -91,7 +97,7 @@
>
<span
class="delete pointer"
:class="{ unDelete: text.distribute }"
:class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)"
>删除</span
>
......@@ -114,22 +120,30 @@
:appList="selectedRowKeys"
:siteVisible.sync="siteVisible"
></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div>
</template>
<script>
import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import { pageSizeOptions } from "@/config/pageConfig.js";
import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import {
getAppList,
deleteApp,
saveApp,
getCategoryList,
} from "@/services/market";
import { mapMutations } from "vuex";
import local from "@/utils/local";
import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
title: "序号",
......@@ -184,6 +198,7 @@ export default {
YSwitch,
AddApp,
CheckSite,
ChangeThem,
},
data() {
return {
......@@ -198,32 +213,21 @@ export default {
size: 10,
total: 0,
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false,
title: "新增应用",
siteVisible: false,
themVisible: false,
dict: {}, // 字典
categoryList: [], // 应用分类列表
};
},
// 进入路由前
// beforeRouteEnter(to, from, text) {
// if (from.path === "/appmarket/appdetails") {
// 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;
// }
// },
computed: {
...mapGetters("site", ["userInfo"]),
},
created() {
this.getCategoryList();
this.getAppList();
......@@ -232,7 +236,6 @@ export default {
...mapMutations("site", ["SET_appDict"]),
// 获取分类列表
async getCategoryList() {
this.loading = true;
let res = await getCategoryList({
page: 1,
size: -1,
......@@ -243,6 +246,7 @@ export default {
this.categoryList = data;
}
},
// 获取应用列表
async getAppList() {
this.loading = true;
......@@ -297,8 +301,17 @@ export default {
this.getAppList();
},
// 勾选表格
onSelectChange(keys) {
onSelectChange(keys, rows) {
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) {
......@@ -306,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row);
this.AddVisible = true;
},
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看
handleCheck(id) {
this.$router.push({
......@@ -317,7 +340,7 @@ export default {
},
// 删除
handleDel(distribute, id) {
if (distribute) {
if (this.userInfo.id != 1 && distribute) {
this.$confirm({
title: "拒绝删除",
content: "该应用正在使用中。",
......@@ -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() {
this.selectedRowKeys = [];
......
......@@ -4,6 +4,12 @@
<a-space>
<a-button type="primary" @click="handleAdd"> 新增应用 </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-input-search
style="width: 300px"
......@@ -67,7 +73,7 @@
</template>
<!-- 版本 -->
<template slot="version" slot-scope="text">
{{ text.version ? "v" + text.version : "--" }}
{{ text.version || text.version == 0 ? "v" + text.version : "--" }}
</template>
<!-- 类型 -->
<template slot="appType" slot-scope="text">
......@@ -91,7 +97,7 @@
>
<span
class="delete pointer"
:class="{ unDelete: text.distribute }"
:class="{ unDelete: userInfo.id != 1 && text.distribute }"
@click="handleDel(text.distribute, text.id)"
>删除</span
>
......@@ -114,6 +120,13 @@
:appList="selectedRowKeys"
:siteVisible.sync="siteVisible"
></CheckSite>
<!-- 批量修改应用主题 -->
<ChangeThem
:themVisible.sync="themVisible"
:themList="categoryList"
:appList="selectedAppList"
@edit="cloneSuccess"
></ChangeThem>
</div>
</template>
......@@ -121,6 +134,7 @@
import YSwitch from "../../../../components/yswitch/YSwitch.vue";
import AddApp from "../modal/AddApp.vue";
import CheckSite from "../modal/CheckSite.vue";
import ChangeThem from "../modal/ChangeThem.vue";
import {
getAppList,
deleteApp,
......@@ -128,7 +142,7 @@ import {
getCategoryList,
} from "@/services/market";
import local from "@/utils/local";
import { mapMutations } from "vuex";
import { mapMutations, mapGetters } from "vuex";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
{
......@@ -184,6 +198,7 @@ export default {
YSwitch,
AddApp,
CheckSite,
ChangeThem,
},
data() {
return {
......@@ -198,15 +213,21 @@ export default {
size: 10,
total: 0,
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
selectedRowKeys: [], // 表格勾选id列表
selectedAppList: [], // 表格勾选信息列表
AddVisible: false,
title: "新增应用",
siteVisible: false,
themVisible: false,
dict: {}, // 字典
categoryList: [], // 应用分类列表
};
},
computed: {
...mapGetters("site", ["userInfo"]),
},
created() {
this.getCategoryList();
this.getAppList();
......@@ -280,8 +301,17 @@ export default {
this.getAppList();
},
// 勾选表格
onSelectChange(keys) {
onSelectChange(keys, rows) {
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) {
......@@ -289,6 +319,16 @@ export default {
this.$refs.AddApp.onEdit(row);
this.AddVisible = true;
},
// 批量修改应用主题
handleTheme() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选应用");
return;
}
this.themVisible = true;
},
// 查看
handleCheck(id) {
this.$router.push({
......@@ -301,7 +341,7 @@ export default {
},
// 删除
handleDel(distribute, id) {
if (distribute) {
if (this.userInfo.id != 1 && distribute) {
this.$confirm({
title: "拒绝删除",
content: "该应用正在使用中。",
......@@ -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() {
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 @@
}"
:columns="columns"
:data-source="siteBusinessList"
:rowKey="(record) => record.id"
:rowKey="(record) => record.businessId"
:row-selection="{
selectedRowKeys: rowKeys,
onChange: handleChange,
......@@ -79,7 +79,7 @@
<script>
import { getSiteBusinessList } from "@/services/business";
import { addBusinessToWindow } from "@/services/dept";
import { extractTree } from "@/utils/util";
// import { extractTree } from "@/utils/util";
import local from "@/utils/local";
const columns = [
{
......@@ -137,12 +137,7 @@ export default {
await this.getSiteBusinessList();
this.formData = info;
if (info.businessIds.length) {
let arr = extractTree(this.siteBusinessList, "children").map((v) =>
Number(v.id)
);
this.rowKeys = arr.filter((v) => {
return info.businessIds.some((val) => v == val);
});
this.rowKeys = info.businessIds;
} else {
this.rowKeys = [];
}
......@@ -193,17 +188,17 @@ export default {
onSelectRow(record, selected) {
if (selected && record.children && record.children.length) {
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) {
this.rowKeys = this.rowKeys.filter((v) => v != record.id);
this.rowKeys = this.rowKeys.filter((v) => v != record.businessId);
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) {
this.rowKeys = [...new Set([...this.rowKeys, record.parentId])];
} 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 {
align-items: center;
justify-content: space-between;
}
</style>
\ No newline at end of file
</style>
......@@ -16,10 +16,16 @@
@click="handleSync(siteData[0].id)"
>同步数据</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 type="danger" @click="deleteSite(siteData[0].id, 0)"
<a-button
v-permission="[1]"
type="danger"
@click="deleteSite(siteData[0].id, 0)"
>删除</a-button
>
</a-space>
......
......@@ -55,6 +55,7 @@ import SelfService from "../selfservice/SelfService.vue";
import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { mapState, mapMutations } from "vuex";
import { filterItems } from "@/utils";
export default {
......@@ -71,6 +72,7 @@ export default {
DesSelfService,
SignDevicekin,
InfoDisSkin,
DefaultShow,
},
props: {},
data() {
......@@ -121,6 +123,8 @@ export default {
case "xxgk":
str = "InfoDisSkin";
break;
default:
str = "DefaultShow";
}
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";
import DesSelfService from "../desSelfservice/DesSelfService.vue";
import SignDevicekin from "../signdeviceskin/SignDeviceSkin.vue";
import InfoDisSkin from "../infoDisSkin/InfoDisSkin.vue";
import DefaultShow from "../defaultshow/DefaultShow.vue";
import { uploadFile, skinSave, getTemplateList } from "@/services/surface";
import html2canvas from "html2canvas";
import { Empty } from "ant-design-vue";
......@@ -215,6 +216,7 @@ export default {
DesSelfService,
SignDevicekin,
InfoDisSkin,
DefaultShow,
},
props: {
isShow: {
......@@ -312,6 +314,8 @@ export default {
case "xxgk":
str = "InfoDisSkin";
break;
default:
str = "DefaultShow";
}
return str;
},
......
......@@ -285,6 +285,7 @@ module.exports = {
list: `${BASE_URL}/base/app/list`,
info: `${BASE_URL}/base/app/info`,
save: `${BASE_URL}/base/app/save`,
batchSave: `${BASE_URL}/base/app/batchSave`,
delete: `${BASE_URL}/base/app/delete`,
distribute: `${BASE_URL}/base/app/appDistribute`,
clone: `${BASE_URL}/base/app/cloneAppsBySites`,
......
......@@ -27,6 +27,10 @@ export async function getAppInfo(data) {
export async function saveApp(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) {
return request(App.delete, METHOD.GET, data);
......
# 开发环境配置
NODE_ENV = development
# 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://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://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
......@@ -18,7 +18,7 @@ export function changePassword(params) {
}
// 1.2.5. 查询门户口号
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) {
......
......@@ -12,7 +12,7 @@
<audio
v-else-if="previeData.type === 'audio'"
controls
src="@/assets/images/out.mp3"
:src="previeData.url"
></audio>
</div>
<a-icon @click="Visible = false" type="close-circle" />
......
<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="slogan">
<p class="slogan-text slogan-text-1 mb-12">{{ sloganTitle }}</p>
......@@ -312,6 +315,7 @@ export default {
{ required: true, validator: changePwdAgain, trigger: "blur" },
],
},
imgUrl: "",
};
},
computed: {
......@@ -330,7 +334,17 @@ export default {
methods: {
...mapMutations("user", ["set_token", "SET_USERDATA", "set_siteList"]),
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) {
this.sloganTitle = res.data;
localStorage.setItem("sloganTitle", res.data);
......@@ -492,7 +506,7 @@ export default {
--input-height: 50px;
--input-border-color: rgba(238, 238, 238, 1);
--time: 1.5s;
background: url("@/assets/images/login_bg.jpg");
// background: url("@/assets/images/login_bg.jpg");
background-size: 100% auto;
animation: bg-roll 150s cubic-bezier(0.21, 0.07, 0.88, 1.02) infinite;
.main {
......
......@@ -19,7 +19,6 @@
class="img-title mb-[42px]"
src="@/assets/images/siteArrange/title.png"
/> -->
<h1 class="slogan_title">{{ sloganTitle }}</h1>
<div class="slogan">建设高效便民、智慧泛在的智慧政务大厅</div>
</div>
<!-- 站点 -->
......@@ -46,7 +45,11 @@
v-for="(v, i) in collectList"
: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
class="w-full h-full object-contain"
:src="api + v.modelIcon"
......@@ -92,7 +95,11 @@
v-for="item in v.list"
: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
class="w-full h-full object-contain"
:src="api + item.modelIcon"
......@@ -118,7 +125,6 @@ import { mapState } from "vuex";
export default {
data() {
return {
sloganTitle:'',
api: process.env.VUE_APP_API_IMG_URL,
siteId: Storage.get(2, "siteId"),
arr: [],
......@@ -137,7 +143,6 @@ export default {
},
created() {
this.sloganTitle=localStorage.getItem('sloganTitle')
this.getCollect();
this.appsListInterface();
},
......@@ -160,7 +165,7 @@ export default {
this.siteModelList = data;
}
},
openWindow(row) {
async openWindow(event, row, type) {
let siteid = Storage.get(2, "siteId") || 0;
let siteName = Storage.get(2, "siteName") || "";
let userInfo = JSON.stringify({
......@@ -169,13 +174,48 @@ export default {
});
let { modelUrl, modelName, modelIcon } = row;
let path = this.$route.path;
modelName = encodeURI(modelName);
window.open(
`${modelUrl}?token=${this.token}&siteid=${siteid}&siteName=${encodeURI(
siteName
)}&userInfo=${userInfo}&sysName=${modelName}&sysLogo=${modelIcon}&path=${path}`,
"_blank"
);
let compileModelName = encodeURI(modelName);
let params = `?token=${this.token}&siteid=${siteid}&siteName=${encodeURI(
siteName
)}&userInfo=${userInfo}&sysName=${compileModelName}&sysLogo=${modelIcon}&path=${path}`;
if (type === "click") {
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() {
......@@ -233,15 +273,36 @@ export default {
}
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>
<style>
.notif-name {
font-size: 14px;
font-weight: 600;
}
</style>
<style lang="less" scoped>
.station {
background: url("@/assets/images/siteArrange/bg_3.jpg") no-repeat;
background-size: 100% 100%;
overflow: hidden;
.del-box {
width: 100%;
height: 150px;
......@@ -260,13 +321,6 @@ export default {
top: 0px;
}
.title {
.slogan_title {
font-size: 65px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #ffffff;
margin-bottom: 30px;
}
.slogan {
font-size: 39px;
font-family: Source Han Sans CN;
......
......@@ -16,6 +16,10 @@ module.exports = defineConfig({
"^/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