Commit 26c99575 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents d869f8fd 3b78c024
#开发环境 #开发环境
NODE_ENV = "development" NODE_ENV = "development"
VUE_APP_API_BASE_URL=http://192.168.0.98:11078/base VUE_APP_API_BASE_URL=http://192.168.0.98:11078
#VUE_APP_API_BASE_URL=http://192.168.0.98:11023 #VUE_APP_API_BASE_URL=http://192.168.0.98:11023
#VUE_APP_API_BASE_URL=http://192.168.0.217:17311 #VUE_APP_API_BASE_URL=http://192.168.0.217:17311
\ No newline at end of file
#生产环境 #生产环境
NODE_ENV = "production" NODE_ENV = "production"
VUE_APP_API_BASE_URL=http://192.168.0.251:11078/base VUE_APP_API_BASE_URL=http://192.168.0.251:11078
\ No newline at end of file \ No newline at end of file
#测试环境 #测试环境
NODE_ENV = "test" NODE_ENV = "test"
VUE_APP_API_BASE_URL=http://192.168.0.98:11078/base VUE_APP_API_BASE_URL=http://192.168.0.98:11078
\ No newline at end of file \ No newline at end of file
...@@ -213,3 +213,10 @@ ...@@ -213,3 +213,10 @@
.fontw800{ .fontw800{
font-weight:800; font-weight:800;
} }
.skin-box {
height: 100%;
}
.empty {
height: 100%;
}
\ No newline at end of file
<template> <template>
<!-- 应用预览页面 --> <!-- 应用预览页面 -->
<div class="app-preview"> <div class="app-preview">
<!-- <div class="header">
<span class="btn" @click="handleBack">
<a-icon type="left" class="mr10" />
<span>返回上一级</span>
</span>
</div> -->
<!-- <div class="main flex1">
<iframe
style="width: 100%; height: 100%"
:src="previewUrl"
frameborder="0"
></iframe>
</div> -->
<iframe <iframe
name="myIframe" name="myIframe"
style="width: 100%; height: 100%" style="width: 100%; height: 100%"
...@@ -28,7 +15,8 @@ export default { ...@@ -28,7 +15,8 @@ export default {
data() { data() {
return { return {
previewInfo: this.$route.query, previewInfo: this.$route.query,
previewUrl: "", previewUrl: "http://192.168.0.192:8082",
loading: true,
}; };
}, },
created() { created() {
...@@ -38,7 +26,8 @@ export default { ...@@ -38,7 +26,8 @@ export default {
sendInfo() { sendInfo() {
let siteId = this.previewInfo.siteId; let siteId = this.previewInfo.siteId;
let appId = this.previewInfo.appId; let appId = this.previewInfo.appId;
this.previewUrl = `${this.previewInfo.previewUrl}?siteId=${siteId}&appId=${appId}`; let baseUrl = process.env.VUE_APP_API_BASE_URL;
this.previewUrl = `${this.previewInfo.previewUrl}?siteId=${siteId}&appId=${appId}&baseUrl=${baseUrl}`;
/* eslint-disable */ /* eslint-disable */
// myIframe.window.postMessage(obj, "*"); // myIframe.window.postMessage(obj, "*");
}, },
...@@ -48,32 +37,8 @@ export default { ...@@ -48,32 +37,8 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.app-preview { .app-preview {
width: 1920px; width: 100%;
height: 1080px; height: 100vh;
// padding-bottom: 20px;
background-color: #f5f5f5; background-color: #f5f5f5;
// .header {
// width: 100%;
// height: 100px;
// line-height: 100px;
// height: 100px;
// padding: 0px 40px;
// margin-bottom: 10px;
// background: url("../../../assets/img/title.jpg") no-repeat center;
// background-size: 100% 100%;
// box-shadow: 0px 2px 6px 6px #ccc;
// .back-text {
// font-size: 28px;
// color: #ffffff;
// }
// .btn {
// font-size: 28px;
// color: #fff;
// cursor: pointer;
// }
// }
// .main {
// width: 98%;
// }
} }
</style> </style>
\ No newline at end of file
...@@ -168,9 +168,7 @@ export default { ...@@ -168,9 +168,7 @@ export default {
}, },
]; ];
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
columns, columns,
appId: this.$route.query.id, appId: this.$route.query.id,
appInfo: {}, // 应用信息 appInfo: {}, // 应用信息
......
...@@ -171,9 +171,7 @@ export default { ...@@ -171,9 +171,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
columns, columns,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
:action="api2 + 'file/commonupload'" :action="api + 'base/file/commonupload'"
:before-upload="iconBeforeUpload" :before-upload="iconBeforeUpload"
@change="handleChangeIcon" @change="handleChangeIcon"
> >
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
> >
<a-upload <a-upload
name="file" name="file"
:action="api2 + 'file/commonupload'" :action="api + 'base/file/commonupload'"
:multiple="false" :multiple="false"
:file-list="fileList" :file-list="fileList"
@change="handleChangeFile" @change="handleChangeFile"
...@@ -169,10 +169,7 @@ export default { ...@@ -169,10 +169,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
api2: process.env.VUE_APP_API_BASE_URL + "/",
labelCol: { labelCol: {
span: 3, span: 3,
}, },
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
<template slot="modelIcon" slot-scope="text"> <template slot="modelIcon" slot-scope="text">
<div v-if="text.modelIcon"> <div v-if="text.modelIcon">
<div class="svg-box" v-if="isSvg(text.modelIcon)"> <div class="svg-box" v-if="isSvg(text.modelIcon)">
<img width="30" height="30" :src="api2 + text.modelIcon" /> <img width="30" height="30" :src="api + text.modelIcon" />
</div> </div>
<div class="svg-box" v-else> <div class="svg-box" v-else>
<img width="30" height="30" :src="api2 + text.modelIcon" /> <img width="30" height="30" :src="api + text.modelIcon" />
</div> </div>
</div> </div>
<span v-else>--</span> <span v-else>--</span>
...@@ -166,16 +166,16 @@ ...@@ -166,16 +166,16 @@
<a-upload <a-upload
name="file" name="file"
list-type="picture-card" list-type="picture-card"
:action="api + 'file/commonupload'" :action="api + 'base/file/commonupload'"
@change="handleUpload" @change="handleUpload"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:show-upload-list="false" :show-upload-list="false"
> >
<div v-if="formData.modelIcon"> <div v-if="formData.modelIcon">
<div class="svg-box" v-if="isSvg(formData.modelIcon)"> <div class="svg-box" v-if="isSvg(formData.modelIcon)">
<img :src="api2 + formData.modelIcon" /> <img :src="api + formData.modelIcon" />
</div> </div>
<img v-else :src="api2 + formData.modelIcon" /> <img v-else :src="api + formData.modelIcon" />
</div> </div>
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
...@@ -261,9 +261,6 @@ export default { ...@@ -261,9 +261,6 @@ export default {
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
columns, columns,
loading: true, loading: true,
title: "新增模块", title: "新增模块",
......
...@@ -160,14 +160,14 @@ ...@@ -160,14 +160,14 @@
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
:action="api + 'file/commonupload'" :action="api + 'base/file/commonupload'"
:before-upload="beforeUpload" :before-upload="beforeUpload"
@change="handleChange" @change="handleChange"
> >
<img <img
class="logo" class="logo"
v-if="formInfo.logoPath" v-if="formInfo.logoPath"
:src="api2 + formInfo.logoPath" :src="api + formInfo.logoPath"
/> />
<div v-else> <div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" /> <a-icon :type="loading ? 'loading' : 'plus'" />
...@@ -307,9 +307,6 @@ export default { ...@@ -307,9 +307,6 @@ export default {
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
loading: false, loading: false,
options: regionData, // 地区级联数据 options: regionData, // 地区级联数据
tablename: "", //接口名称 tablename: "", //接口名称
......
<template> <template>
<div> <div class="skin-box">
<!-- 评价器 横板皮肤 --> <!-- 评价器 横板皮肤 -->
<div <div
:id="conponentsId" :id="conponentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -96,6 +97,17 @@ ...@@ -96,6 +97,17 @@
></div> --> ></div> -->
</div> </div>
</div> </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> </div>
</template> </template>
...@@ -120,9 +132,7 @@ export default { ...@@ -120,9 +132,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
}; };
}, },
methods: { methods: {
......
<template> <template>
<div> <div class="skin-box">
<!-- 呼叫器 横板皮肤 --> <!-- 呼叫器 横板皮肤 -->
<div <div
:id="conponentsId" :id="conponentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -122,6 +123,17 @@ ...@@ -122,6 +123,17 @@
</div> </div>
</div> </div>
</div> </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> </div>
</template> </template>
...@@ -146,9 +158,7 @@ export default { ...@@ -146,9 +158,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
}; };
}, },
methods: { methods: {
......
<template> <template>
<div> <div class="skin-box">
<!-- 集中显示屏 横板 --> <!-- 集中显示屏 横板 -->
<div <div
class="centralize-across" class="centralize-across"
:id="conponentsId" :id="conponentsId"
v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -156,6 +157,17 @@ ...@@ -156,6 +157,17 @@
</div> </div>
</div> </div>
</div> </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> </div>
</template> </template>
...@@ -180,9 +192,7 @@ export default { ...@@ -180,9 +192,7 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
}; };
}, },
methods: { methods: {
......
...@@ -54,6 +54,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue"; ...@@ -54,6 +54,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue";
import WindowSkin from "../windowskin/WindowSkin.vue"; import WindowSkin from "../windowskin/WindowSkin.vue";
import CentralizeSkin from "../centralizeskin/CentralizeSkin.vue"; import CentralizeSkin from "../centralizeskin/CentralizeSkin.vue";
import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue"; import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue";
import SampleFormSkin from "../sampleFormSkin/SampleFormSkin.vue";
import WriteFormSkin from "../writeFormSkin/WriteFormSkin.vue";
export default { export default {
components: { components: {
LandscapeMode, LandscapeMode,
...@@ -61,6 +63,8 @@ export default { ...@@ -61,6 +63,8 @@ export default {
WindowSkin, WindowSkin,
CentralizeSkin, CentralizeSkin,
AppraiseSkin, AppraiseSkin,
SampleFormSkin,
WriteFormSkin,
}, },
props: {}, props: {},
data() { data() {
...@@ -98,6 +102,15 @@ export default { ...@@ -98,6 +102,15 @@ export default {
case 6: case 6:
str = "AppraiseSkin"; str = "AppraiseSkin";
break; break;
case 7:
// str = "AppraiseSkin";
break;
case 8:
str = "WriteFormSkin";
break;
case 9:
str = "SampleFormSkin";
break;
} }
return str; return str;
}, },
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-spin :spinning="formLoading">
<a-row v-if="formData.skinFieldList.length"> <a-row v-if="formData.skinFieldList.length">
<!-- 背景图 --> <!-- 背景图 -->
<a-col <a-col
...@@ -162,6 +163,7 @@ ...@@ -162,6 +163,7 @@
description="暂无皮肤字段属性" description="暂无皮肤字段属性"
:image="simpleImage" :image="simpleImage"
/> />
</a-spin>
</a-form-model> </a-form-model>
</div> </div>
<div class="btn-box"> <div class="btn-box">
...@@ -191,6 +193,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue"; ...@@ -191,6 +193,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue";
import WindowSkin from "../windowskin/WindowSkin.vue"; import WindowSkin from "../windowskin/WindowSkin.vue";
import CentralizeSkin from "../centralizeskin/CentralizeSkin.vue"; import CentralizeSkin from "../centralizeskin/CentralizeSkin.vue";
import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue"; import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue";
import SampleFormSkin from "../sampleFormSkin/SampleFormSkin.vue";
import WriteFormSkin from "../writeFormSkin/WriteFormSkin.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";
...@@ -202,6 +206,8 @@ export default { ...@@ -202,6 +206,8 @@ export default {
WindowSkin, WindowSkin,
CentralizeSkin, CentralizeSkin,
AppraiseSkin, AppraiseSkin,
SampleFormSkin,
WriteFormSkin,
}, },
props: { props: {
isShow: { isShow: {
...@@ -220,10 +226,11 @@ export default { ...@@ -220,10 +226,11 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
formLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
facilityInfo: {}, // 设备信息 facilityInfo: {}, // 设备信息
skinTemplate: [], // 皮肤模板列表 skinTemplate: [], // 皮肤模板列表
curSkinTemplate: "", //当前选择皮肤模板 curSkinTemplate: undefined, //当前选择皮肤模板
isEdit: false, // 是否编辑状态 isEdit: false, // 是否编辑状态
formData: { formData: {
categoryId: undefined, // 所属种类 categoryId: undefined, // 所属种类
...@@ -280,6 +287,15 @@ export default { ...@@ -280,6 +287,15 @@ export default {
case 6: case 6:
str = "AppraiseSkin"; str = "AppraiseSkin";
break; break;
case 7:
// str = "AppraiseSkin";
break;
case 8:
str = "WriteFormSkin";
break;
case 9:
str = "SampleFormSkin";
break;
} }
return str; return str;
}, },
...@@ -303,6 +319,8 @@ export default { ...@@ -303,6 +319,8 @@ export default {
this.$refs.formData && this.$refs.formData.resetFields(); this.$refs.formData && this.$refs.formData.resetFields();
this.isEdit = false; this.isEdit = false;
this.show = false; this.show = false;
this.skinTemplate = [];
this.curSkinTemplate = undefined;
}, },
// 获取设备信息 // 获取设备信息
getFacilityInfo(info) { getFacilityInfo(info) {
...@@ -310,6 +328,7 @@ export default { ...@@ -310,6 +328,7 @@ export default {
}, },
// 获取皮肤模板 // 获取皮肤模板
async getTemplateList(search = {}) { async getTemplateList(search = {}) {
this.formLoading = true;
let res = await getTemplateList({ let res = await getTemplateList({
page: 1, page: 1,
size: -1, size: -1,
...@@ -317,7 +336,7 @@ export default { ...@@ -317,7 +336,7 @@ export default {
...search, ...search,
}); });
let { data } = res.data.data; let { data } = res.data.data;
console.log(data); this.formLoading = false;
if (data.length) { if (data.length) {
data.forEach((v) => { data.forEach((v) => {
for (let item of v.skinFieldList) { for (let item of v.skinFieldList) {
...@@ -406,15 +425,13 @@ export default { ...@@ -406,15 +425,13 @@ export default {
...this.facilityInfo, ...this.facilityInfo,
...this.formData, ...this.formData,
}); });
this.loading = false;
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
this.$emit("addSkinSuccess"); this.$emit("addSkinSuccess");
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
this.loading = false;
this.show = false; this.show = false;
} else {
this.loading = false;
} }
}); });
} }
...@@ -479,7 +496,7 @@ export default { ...@@ -479,7 +496,7 @@ export default {
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
border-radius: 5px; border-radius: 5px;
background: #939392; background: rgba(144, 147, 153, 0.5);
} }
&::-webkit-scrollbar-track { &::-webkit-scrollbar-track {
box-shadow: 0; box-shadow: 0;
......
<template> <template>
<div> <div class="skin-box">
<!-- 排号机 1920*1080 --> <!-- 排号机 1920*1080 -->
<div <div
:id="conponentsId" :id="conponentsId"
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
</div> </div>
</div> </div>
<!-- 空数据显示 --> <!-- 空数据显示 -->
<div class="empty flex aic jcc" v-else>
<a-empty <a-empty
v-else
:image="require('../../../../assets/img/original.png')" :image="require('../../../../assets/img/original.png')"
:image-style="{ :image-style="{
height: '80px', height: '80px',
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span> <span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty> </a-empty>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -107,40 +108,10 @@ export default { ...@@ -107,40 +108,10 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
}; };
}, },
methods: { methods: {
// 过滤图片
// filterImg(val) {
// let url = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "2";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// url = v.fieldValue;
// }
// });
// return url;
// },
// // 过滤颜色
// filterColor(val) {
// let str = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "1";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// str = v.fieldValue;
// }
// });
// return str;
// },
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => { let arr = this.skinFieldList.filter((v) => {
......
<template>
<div class="skin-box">
<!-- 样表机 横板 -->
<div
:id="conponentsId"
v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic"
:style="{
background: filterItem('1', 0),
}"
>
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="left flex aic">
<img class="mr20" src="../../../../assets/img/logo.png" />
<div
class="title"
:style="{
color: filterItem('2', 0),
}"
>
政务服务中心
</div>
</div>
<div class="right flex aic">
<div class="flex aic mr10">
<span
:style="{
color: filterItem('2', 0),
}"
>今日节约能量:</span
>
<div class="count">66g</div>
</div>
<div class="flex aic">
<span
:style="{
color: filterItem('2', 0),
}"
>累计节约能量:</span
>
<div class="count">666kg</div>
</div>
</div>
</div>
<!-- 标题 -->
<img class="title-img" src="../../../../assets/img/yangbiao.png" alt="" />
<!-- 搜索框 -->
<div class="search-box">
<div
class="search-box-btn flex aic jcc"
:style="{
background: `linear-gradient(90deg, ${filterItem(
'7',
0
)}, ${filterItem('8', 0)})`,
}"
>
<img src="../../../../assets/img/sousuo.png" />
搜索
</div>
</div>
<!-- 热门词汇 -->
<div class="hot-text">
<span>热门词汇:</span>
</div>
<!-- 主体内容 -->
<div class="main flex aic jcb">
<div class="left">热门表单区域</div>
<div class="right flex flexc jcb">
<div
class="top flex aic jcc"
:style="{
background: filterItem('4', 0),
}"
:class="{ border: !filterItem('4', 0) }"
>
btn1
</div>
<div class="bottom flex aic jcc">热门事项</div>
</div>
</div>
<!-- 底部 -->
<div class="footer flex aic mt20">
<div class="flex1 tac">
<span
:style="{
color: filterItem('5', 0),
}"
>入驻表单量:</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20份</span
>
</div>
<div class="flex1 tac">
<span
:style="{
color: filterItem('5', 0),
}"
>入驻事项量:</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20件</span
>
</div>
</div>
</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: {
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
conponentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_BASE_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;
},
},
};
</script>
<style lang="less" scoped>
.sample_form_skin {
width: 1000px;
height: 562.5px;
padding: 20px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important ;
background-position: center !important ;
background-size: cover !important ;
.header {
width: 100%;
color: #fff;
.title {
font-size: 30px;
font-weight: 600;
}
.right {
.count {
width: 50px;
height: 50px;
background: url("../../../../assets/img/pic_png_nengliang.png")
no-repeat center;
background-size: 100% 100%;
color: #317054;
text-align: center;
line-height: 50px;
}
}
}
.title-img {
width: 600px;
margin-top: 20px;
}
.search-box {
width: 600px;
height: 38px;
margin-top: 20px;
background: #ffffff;
box-shadow: 0px 7px 13px 0px rgba(0, 0, 0, 0.1);
border-radius: 8px;
position: relative;
.search-box-btn {
width: 70px;
height: 30px;
background: linear-gradient(90deg, #0857e8, #59d1fe);
border-radius: 4px;
color: #fff;
position: absolute;
right: 4px;
top: 4px;
img {
width: 18px;
margin-right: 6px;
}
}
}
.hot-text {
width: 600px;
margin-top: 10px;
color: #fff;
}
.main {
width: 800px;
height: 250px;
margin-top: 10px;
color: #fff;
.left {
width: 54%;
height: 100%;
border: 1px dashed #ececec;
border-radius: 4px;
text-align: center;
line-height: 200px;
}
.right {
width: 44%;
height: 100%;
border-radius: 4px;
.top {
height: 40%;
width: 100%;
border-radius: 4px;
background-size: 100% 100% !important;
}
.border {
border: 1px dashed #ececec;
}
.bottom {
height: 58%;
width: 100%;
border: 1px dashed #ececec;
border-radius: 4px;
}
}
}
.footer {
width: 800px;
color: #fff;
}
}
</style>
\ No newline at end of file
<template> <template>
<div> <div class="skin-box">
<!-- 窗口屏 横板 --> <!-- 窗口屏 横板 -->
<div <div
:id="conponentsId" :id="conponentsId"
class="window-skin-across flex jcb aic" class="window-skin-across flex jcb aic"
v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
}" }"
...@@ -58,6 +59,17 @@ ...@@ -58,6 +59,17 @@
<div class="footer-banner">Banner展示区</div> <div class="footer-banner">Banner展示区</div>
</div> </div>
</div> </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> </div>
</template> </template>
...@@ -82,41 +94,10 @@ export default { ...@@ -82,41 +94,10 @@ export default {
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
}; };
}, },
methods: { methods: {
// 过滤图片
// filterImg(val) {
// let url = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "2";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// url = v.fieldValue;
// }
// });
// return url;
// },
// // 过滤颜色
// filterColor(val) {
// let str = "";
// this.skinFieldList
// .filter((v) => {
// return v.fieldType === "1";
// })
// .forEach((v) => {
// if (v.fieldName !== "" && v.fieldName === val) {
// str = v.fieldValue;
// }
// });
// return str;
// },
// 过滤属性类型 // 过滤属性类型
filterItem(type, index) { filterItem(type, index) {
let arr = this.skinFieldList.filter((v) => { let arr = this.skinFieldList.filter((v) => {
......
<template>
<div class="skin-box">
<!-- 样表机 横板 -->
<div
:id="conponentsId"
v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic"
:style="{
background: filterItem('1', 0),
}"
>
<!-- 头部 -->
<div class="header flex aic jcb">
<div class="left flex aic">
<img class="mr20" src="../../../../assets/img/logo.png" />
<div
class="title"
:style="{
color: filterItem('2', 0),
}"
>
政务服务中心
</div>
</div>
<div class="right flex aic">
<div class="flex aic mr10">
<span
:style="{
color: filterItem('2', 0),
}"
>今日节约能量:</span
>
<div class="count">66g</div>
</div>
<div class="flex aic">
<span
:style="{
color: filterItem('2', 0),
}"
>累计节约能量:</span
>
<div class="count">666kg</div>
</div>
</div>
</div>
<!-- 标题 -->
<img class="title-img" src="../../../../assets/img/tiandan.png" alt="" />
<!-- 搜索框 -->
<div class="search-box">
<div
class="search-box-btn flex aic jcc"
:style="{
background: `linear-gradient(90deg, ${filterItem(
'7',
0
)}, ${filterItem('8', 0)})`,
}"
>
<img src="../../../../assets/img/sousuo.png" />
搜索
</div>
</div>
<!-- 热门词汇 -->
<div class="hot-text">
<span>热门词汇:</span>
</div>
<!-- 主体内容 -->
<div class="main flex aic jcb">
<div class="left">热门排行区域</div>
<div class="right flex flexc jcb">
<div class="top flex aic jcb">
<div
class="btn1 flex jcc aic"
:style="{
background: filterItem('4', 0),
}"
:class="{ border: !filterItem('4', 0) }"
>
btn1
</div>
<div
class="btn2 flex jcc aic"
:style="{
background: filterItem('4', 1),
}"
:class="{ border: !filterItem('4', 1) }"
>
btn2
</div>
</div>
<div class="bottom flex aic jcc">应用区域</div>
</div>
</div>
<!-- 底部 -->
<div class="footer flex aic jca mt20">
<div class="flex flexc aic">
<span
:style="{
color: filterItem('5', 0),
}"
>入驻表单量</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20份</span
>
</div>
<div class="flex flexc aic">
<span
:style="{
color: filterItem('5', 0),
}"
>入驻事项量</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20件</span
>
</div>
<div class="flex flexc aic">
<span
:style="{
color: filterItem('5', 0),
}"
>本地打印量</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20次</span
>
</div>
<div class="flex flexc aic">
<span
:style="{
color: filterItem('5', 0),
}"
>在线提交量</span
>
<span
:style="{
color: filterItem('7', 0),
}"
>20次</span
>
</div>
</div>
</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: {
skinFieldList: {
type: Array,
required: true,
default: () => {
return [];
},
},
imageResolution: {
required: true,
default: "1",
},
conponentsId: {
required: true,
type: String,
},
},
data() {
return {
api: process.env.VUE_APP_API_BASE_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;
},
},
};
</script>
<style lang="less" scoped>
.sample_form_skin {
width: 1000px;
height: 562.5px;
padding: 20px;
background-image: linear-gradient(#26c5ff, #2c66ff);
background-repeat: no-repeat !important ;
background-position: center !important ;
background-size: cover !important ;
.header {
width: 100%;
color: #fff;
.title {
font-size: 30px;
font-weight: 600;
}
.right {
.count {
width: 50px;
height: 50px;
background: url("../../../../assets/img/pic_png_nengliang.png")
no-repeat center;
background-size: 100% 100%;
color: #317054;
text-align: center;
line-height: 50px;
}
}
}
.title-img {
width: 600px;
margin-top: 20px;
}
.search-box {
width: 600px;
height: 38px;
margin-top: 20px;
background: #ffffff;
box-shadow: 0px 7px 13px 0px rgba(0, 0, 0, 0.1);
border-radius: 8px;
position: relative;
.search-box-btn {
width: 70px;
height: 30px;
background: linear-gradient(90deg, #0857e8, #59d1fe);
border-radius: 4px;
color: #fff;
position: absolute;
right: 4px;
top: 4px;
img {
width: 18px;
margin-right: 6px;
}
}
}
.hot-text {
width: 600px;
margin-top: 10px;
color: #fff;
}
.main {
width: 800px;
height: 250px;
margin-top: 10px;
color: #fff;
.left {
width: 49%;
height: 100%;
border: 1px dashed #ececec;
border-radius: 4px;
text-align: center;
line-height: 200px;
}
.right {
width: 49%;
height: 100%;
border-radius: 4px;
.top {
height: 49%;
width: 100%;
.btn1 {
height: 100%;
width: 54%;
border-radius: 4px;
background-size: 100% 100% !important;
}
.btn2 {
height: 100%;
width: 44%;
border-radius: 4px;
background-size: 100% 100% !important;
}
}
.border {
border: 1px dashed #ececec;
}
.bottom {
height: 49%;
width: 100%;
border: 1px dashed #ececec;
border-radius: 4px;
}
}
}
.footer {
width: 800px;
color: #fff;
}
}
</style>
\ No newline at end of file
...@@ -180,7 +180,6 @@ ...@@ -180,7 +180,6 @@
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
:action="api + '/file/commonupload'"
:customRequest="uploadImg" :customRequest="uploadImg"
:before-upload="beforeUpload" :before-upload="beforeUpload"
> >
...@@ -322,9 +321,7 @@ export default { ...@@ -322,9 +321,7 @@ export default {
} }
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
loading: false, loading: false,
imageUrl: "", imageUrl: "",
labelCol: { span: 5 }, labelCol: { span: 5 },
......
...@@ -185,7 +185,6 @@ ...@@ -185,7 +185,6 @@
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
:action="api + '/file/commonupload'"
:customRequest="uploadImg" :customRequest="uploadImg"
:before-upload="beforeUpload" :before-upload="beforeUpload"
> >
...@@ -384,9 +383,7 @@ export default { ...@@ -384,9 +383,7 @@ export default {
} }
}; };
return { return {
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
loading: false, loading: false,
imageUrl: "", imageUrl: "",
labelCol: { span: 5 }, labelCol: { span: 5 },
......
...@@ -326,9 +326,7 @@ export default { ...@@ -326,9 +326,7 @@ export default {
loading: false, loading: false,
visibleEditPwd: false, visibleEditPwd: false,
editVisible: false, editVisible: false,
api: process.env.VUE_APP_API_BASE_URL.includes("base") api: process.env.VUE_APP_API_BASE_URL + "/",
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
deptData: [], // 部门数据 deptData: [], // 部门数据
windowData: [], // 窗口数据 windowData: [], // 窗口数据
......
This diff is collapsed.
// import Cookie from 'js-cookie' // import Cookie from 'js-cookie'
import local from '@/utils/local' import local from "@/utils/local";
import {message} from 'ant-design-vue' import { message } from "ant-design-vue";
// 401拦截 // 401拦截
// const resp401 = { // const resp401 = {
...@@ -33,25 +33,24 @@ import {message} from 'ant-design-vue' ...@@ -33,25 +33,24 @@ import {message} from 'ant-design-vue'
// } // }
// } // }
const resMsg = { const resMsg = {
onFulfilled(response) { onFulfilled(response) {
let {code,msg} = response.data let { code, msg } = response.data;
if(code === 9001 || code === 9002){ if (code === 9001 || code === 9002) {
message.error({ message.error({
content:msg, content: msg,
maxCount:1, maxCount: 1,
}) });
setTimeout(()=>{ setTimeout(() => {
location.href = process.env.VUE_APP_API_portal_URL + "/#/" location.href = process.env.VUE_APP_API_portal_URL + "/#/";
},2000) }, 2000);
}else if(code === -1){ } else if (code === -1) {
message.error({ message.error({
content:msg, content: msg,
maxCount:1, maxCount: 1,
}) });
} }
return response return response;
}, },
onRejected(error) { onRejected(error) {
// const {message} = options // const {message} = options
...@@ -59,9 +58,9 @@ const resMsg = { ...@@ -59,9 +58,9 @@ const resMsg = {
// if (response.code === 403) { // if (response.code === 403) {
// message.error('请求被拒绝') // message.error('请求被拒绝')
// } // }
return Promise.reject(error) return Promise.reject(error);
} },
} };
const reqCommon = { const reqCommon = {
/** /**
...@@ -72,11 +71,11 @@ const reqCommon = { ...@@ -72,11 +71,11 @@ const reqCommon = {
*/ */
onFulfilled(config) { onFulfilled(config) {
// 携带token // 携带token
let token = local.getLocal('token') let token = local.getLocal("token");
if(token){ if (token) {
config.headers.Authorization=token config.headers.Authorization = token;
} }
return config return config;
}, },
/** /**
* 请求出错时做点什么 * 请求出错时做点什么
...@@ -87,12 +86,12 @@ const reqCommon = { ...@@ -87,12 +86,12 @@ const reqCommon = {
onRejected(error) { onRejected(error) {
// const {message} = options // const {message} = options
// message.error(error.message) // message.error(error.message)
return Promise.reject(error) return Promise.reject(error);
} },
} };
export default { export default {
request: [reqCommon], // 请求拦截 request: [reqCommon], // 请求拦截
// response: [resp401, resp403] // 响应拦截 // response: [resp401, resp403] // 响应拦截
response: [resMsg] // 响应拦截 response: [resMsg], // 响应拦截
} };
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