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

Merge remote-tracking branch 'origin/master'

parents d869f8fd 3b78c024
#开发环境
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.217:17311
\ No newline at end of file
#生产环境
NODE_ENV = "production"
VUE_APP_API_BASE_URL=http://192.168.0.251:11078/base
\ No newline at end of file
VUE_APP_API_BASE_URL=http://192.168.0.251:11078
\ No newline at end of file
#测试环境
NODE_ENV = "test"
VUE_APP_API_BASE_URL=http://192.168.0.98:11078/base
\ No newline at end of file
VUE_APP_API_BASE_URL=http://192.168.0.98:11078
\ No newline at end of file
......@@ -213,3 +213,10 @@
.fontw800{
font-weight:800;
}
.skin-box {
height: 100%;
}
.empty {
height: 100%;
}
\ No newline at end of file
<template>
<!-- 应用预览页面 -->
<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
name="myIframe"
style="width: 100%; height: 100%"
......@@ -28,7 +15,8 @@ export default {
data() {
return {
previewInfo: this.$route.query,
previewUrl: "",
previewUrl: "http://192.168.0.192:8082",
loading: true,
};
},
created() {
......@@ -38,7 +26,8 @@ export default {
sendInfo() {
let siteId = this.previewInfo.siteId;
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 */
// myIframe.window.postMessage(obj, "*");
},
......@@ -48,32 +37,8 @@ export default {
<style lang="less" scoped>
.app-preview {
width: 1920px;
height: 1080px;
// padding-bottom: 20px;
width: 100%;
height: 100vh;
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>
\ No newline at end of file
......@@ -168,9 +168,7 @@ export default {
},
];
return {
api: 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,
api: process.env.VUE_APP_API_BASE_URL + "/",
columns,
appId: this.$route.query.id,
appInfo: {}, // 应用信息
......
......@@ -171,9 +171,7 @@ export default {
},
data() {
return {
api: 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,
api: process.env.VUE_APP_API_BASE_URL + "/",
columns,
siteId: local.getLocal("siteId"),
tableData: [], // 表格数据
......
......@@ -34,7 +34,7 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:action="api2 + 'file/commonupload'"
:action="api + 'base/file/commonupload'"
:before-upload="iconBeforeUpload"
@change="handleChangeIcon"
>
......@@ -91,7 +91,7 @@
>
<a-upload
name="file"
:action="api2 + 'file/commonupload'"
:action="api + 'base/file/commonupload'"
:multiple="false"
:file-list="fileList"
@change="handleChangeFile"
......@@ -169,10 +169,7 @@ export default {
},
data() {
return {
api: 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,
api2: process.env.VUE_APP_API_BASE_URL + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
labelCol: {
span: 3,
},
......
......@@ -55,10 +55,10 @@
<template slot="modelIcon" slot-scope="text">
<div v-if="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 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>
<span v-else>--</span>
......@@ -166,16 +166,16 @@
<a-upload
name="file"
list-type="picture-card"
:action="api + 'file/commonupload'"
:action="api + 'base/file/commonupload'"
@change="handleUpload"
:before-upload="beforeUpload"
:show-upload-list="false"
>
<div v-if="formData.modelIcon">
<div class="svg-box" v-if="isSvg(formData.modelIcon)">
<img :src="api2 + formData.modelIcon" />
<img :src="api + formData.modelIcon" />
</div>
<img v-else :src="api2 + formData.modelIcon" />
<img v-else :src="api + formData.modelIcon" />
</div>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
......@@ -261,9 +261,6 @@ export default {
data() {
return {
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,
loading: true,
title: "新增模块",
......
......@@ -160,14 +160,14 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:action="api + 'file/commonupload'"
:action="api + 'base/file/commonupload'"
:before-upload="beforeUpload"
@change="handleChange"
>
<img
class="logo"
v-if="formInfo.logoPath"
:src="api2 + formInfo.logoPath"
:src="api + formInfo.logoPath"
/>
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
......@@ -307,9 +307,6 @@ export default {
};
return {
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,
options: regionData, // 地区级联数据
tablename: "", //接口名称
......
<template>
<div>
<div class="skin-box">
<!-- 评价器 横板皮肤 -->
<div
:id="conponentsId"
class="call-out-skin-across"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
......@@ -96,6 +97,17 @@
></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>
......@@ -120,9 +132,7 @@ export default {
},
data() {
return {
api: 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 + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
};
},
methods: {
......
<template>
<div>
<div class="skin-box">
<!-- 呼叫器 横板皮肤 -->
<div
:id="conponentsId"
class="call-out-skin-across"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
......@@ -122,6 +123,17 @@
</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>
......@@ -146,9 +158,7 @@ export default {
},
data() {
return {
api: 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 + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
};
},
methods: {
......
<template>
<div>
<div class="skin-box">
<!-- 集中显示屏 横板 -->
<div
class="centralize-across"
:id="conponentsId"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
......@@ -156,6 +157,17 @@
</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>
......@@ -180,9 +192,7 @@ export default {
},
data() {
return {
api: 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 + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
};
},
methods: {
......
......@@ -54,6 +54,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue";
import WindowSkin from "../windowskin/WindowSkin.vue";
import CentralizeSkin from "../centralizeskin/CentralizeSkin.vue";
import AppraiseSkin from "../appraiseskin/AppraiseSkin.vue";
import SampleFormSkin from "../sampleFormSkin/SampleFormSkin.vue";
import WriteFormSkin from "../writeFormSkin/WriteFormSkin.vue";
export default {
components: {
LandscapeMode,
......@@ -61,6 +63,8 @@ export default {
WindowSkin,
CentralizeSkin,
AppraiseSkin,
SampleFormSkin,
WriteFormSkin,
},
props: {},
data() {
......@@ -98,6 +102,15 @@ export default {
case 6:
str = "AppraiseSkin";
break;
case 7:
// str = "AppraiseSkin";
break;
case 8:
str = "WriteFormSkin";
break;
case 9:
str = "SampleFormSkin";
break;
}
return str;
},
......
......@@ -98,70 +98,72 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row v-if="formData.skinFieldList.length">
<!-- 背景图 -->
<a-col
:span="12"
v-for="(v, i) in formData.skinFieldList"
v-show="v.fieldType == '2'"
:key="v.id"
>
<a-form-model-item
:label-col="{ span: 10 }"
:wrapper-col="{ span: 14 }"
:label="v.fieldName"
:prop="`skinFieldList.${i}.fieldValue`"
:rules="rules.fieldValue"
<a-spin :spinning="formLoading">
<a-row v-if="formData.skinFieldList.length">
<!-- 背景图 -->
<a-col
:span="12"
v-for="(v, i) in formData.skinFieldList"
v-show="v.fieldType == '2'"
:key="v.id"
>
<a-upload
name="file"
action="file/commonupload"
:before-upload="beforeUpload"
:show-upload-list="false"
:data="{
name: v.fieldName,
prop: `skinFieldList.${i}.fieldValue`,
}"
:customRequest="handleChangeBg"
<a-form-model-item
:label-col="{ span: 10 }"
:wrapper-col="{ span: 14 }"
:label="v.fieldName"
:prop="`skinFieldList.${i}.fieldValue`"
:rules="rules.fieldValue"
>
<a-button class="upload-btn">
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
</a-form-model-item>
</a-col>
<a-upload
name="file"
action="file/commonupload"
:before-upload="beforeUpload"
:show-upload-list="false"
:data="{
name: v.fieldName,
prop: `skinFieldList.${i}.fieldValue`,
}"
:customRequest="handleChangeBg"
>
<a-button class="upload-btn">
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
</a-form-model-item>
</a-col>
<!-- 颜色 -->
<a-col
:span="24"
v-for="(v, i) in formData.skinFieldList"
v-show="v.fieldType === '1'"
:key="v.createTime"
>
<a-form-model-item
:label="v.fieldName"
:prop="`skinFieldList.${i}.fieldValue`"
:rules="rules.fieldValue"
<!-- 颜色 -->
<a-col
:span="24"
v-for="(v, i) in formData.skinFieldList"
v-show="v.fieldType === '1'"
:key="v.createTime"
>
<span class="color-show">{{
v.fieldValue ? v.fieldValue : "--"
}}</span>
<a-button class="select-color-btn">
选择颜色
<input
type="color"
class="color-ipt"
v-model="v.fieldValue"
/>
</a-button>
</a-form-model-item>
</a-col>
</a-row>
<a-empty
v-else
description="暂无皮肤字段属性"
:image="simpleImage"
/>
<a-form-model-item
:label="v.fieldName"
:prop="`skinFieldList.${i}.fieldValue`"
:rules="rules.fieldValue"
>
<span class="color-show">{{
v.fieldValue ? v.fieldValue : "--"
}}</span>
<a-button class="select-color-btn">
选择颜色
<input
type="color"
class="color-ipt"
v-model="v.fieldValue"
/>
</a-button>
</a-form-model-item>
</a-col>
</a-row>
<a-empty
v-else
description="暂无皮肤字段属性"
:image="simpleImage"
/>
</a-spin>
</a-form-model>
</div>
<div class="btn-box">
......@@ -191,6 +193,8 @@ import CallOutSkin from "../calloutskin/CallOutSkin.vue";
import WindowSkin from "../windowskin/WindowSkin.vue";
import CentralizeSkin from "../centralizeskin/CentralizeSkin.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 html2canvas from "html2canvas";
import { Empty } from "ant-design-vue";
......@@ -202,6 +206,8 @@ export default {
WindowSkin,
CentralizeSkin,
AppraiseSkin,
SampleFormSkin,
WriteFormSkin,
},
props: {
isShow: {
......@@ -220,10 +226,11 @@ export default {
data() {
return {
loading: false,
formLoading: false,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
facilityInfo: {}, // 设备信息
skinTemplate: [], // 皮肤模板列表
curSkinTemplate: "", //当前选择皮肤模板
curSkinTemplate: undefined, //当前选择皮肤模板
isEdit: false, // 是否编辑状态
formData: {
categoryId: undefined, // 所属种类
......@@ -280,6 +287,15 @@ export default {
case 6:
str = "AppraiseSkin";
break;
case 7:
// str = "AppraiseSkin";
break;
case 8:
str = "WriteFormSkin";
break;
case 9:
str = "SampleFormSkin";
break;
}
return str;
},
......@@ -303,6 +319,8 @@ export default {
this.$refs.formData && this.$refs.formData.resetFields();
this.isEdit = false;
this.show = false;
this.skinTemplate = [];
this.curSkinTemplate = undefined;
},
// 获取设备信息
getFacilityInfo(info) {
......@@ -310,6 +328,7 @@ export default {
},
// 获取皮肤模板
async getTemplateList(search = {}) {
this.formLoading = true;
let res = await getTemplateList({
page: 1,
size: -1,
......@@ -317,7 +336,7 @@ export default {
...search,
});
let { data } = res.data.data;
console.log(data);
this.formLoading = false;
if (data.length) {
data.forEach((v) => {
for (let item of v.skinFieldList) {
......@@ -406,15 +425,13 @@ export default {
...this.facilityInfo,
...this.formData,
});
this.loading = false;
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.$emit("addSkinSuccess");
this.$refs.formData.resetFields();
this.loading = false;
this.show = false;
} else {
this.loading = false;
}
});
}
......@@ -479,7 +496,7 @@ export default {
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #939392;
background: rgba(144, 147, 153, 0.5);
}
&::-webkit-scrollbar-track {
box-shadow: 0;
......
<template>
<div>
<div class="skin-box">
<!-- 排号机 1920*1080 -->
<div
:id="conponentsId"
......@@ -67,15 +67,16 @@
</div>
</div>
<!-- 空数据显示 -->
<a-empty
v-else
:image="require('../../../../assets/img/original.png')"
:image-style="{
height: '80px',
}"
>
<span slot="description"> <a href="#API">暂无皮肤模板</a> </span>
</a-empty>
<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>
......@@ -107,40 +108,10 @@ export default {
},
data() {
return {
api: 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 + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
};
},
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) {
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>
<div>
<div class="skin-box">
<!-- 窗口屏 横板 -->
<div
:id="conponentsId"
class="window-skin-across flex jcb aic"
v-if="imageResolution === '1'"
:style="{
background: filterItem('1', 0),
}"
......@@ -58,6 +59,17 @@
<div class="footer-banner">Banner展示区</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>
......@@ -82,41 +94,10 @@ export default {
},
data() {
return {
api: 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 + "/",
api: process.env.VUE_APP_API_BASE_URL + "/",
};
},
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) {
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 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:action="api + '/file/commonupload'"
:customRequest="uploadImg"
:before-upload="beforeUpload"
>
......@@ -322,9 +321,7 @@ export default {
}
};
return {
api: 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,
api: process.env.VUE_APP_API_BASE_URL + "/",
loading: false,
imageUrl: "",
labelCol: { span: 5 },
......
......@@ -185,7 +185,6 @@
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
:action="api + '/file/commonupload'"
:customRequest="uploadImg"
:before-upload="beforeUpload"
>
......@@ -384,9 +383,7 @@ export default {
}
};
return {
api: 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,
api: process.env.VUE_APP_API_BASE_URL + "/",
loading: false,
imageUrl: "",
labelCol: { span: 5 },
......
......@@ -326,9 +326,7 @@ export default {
loading: false,
visibleEditPwd: false,
editVisible: false,
api: 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,
api: process.env.VUE_APP_API_BASE_URL + "/",
siteId: local.getLocal("siteId"),
deptData: [], // 部门数据
windowData: [], // 窗口数据
......
This diff is collapsed.
// import Cookie from 'js-cookie'
import local from '@/utils/local'
import {message} from 'ant-design-vue'
import local from "@/utils/local";
import { message } from "ant-design-vue";
// 401拦截
// const resp401 = {
......@@ -33,25 +33,24 @@ import {message} from 'ant-design-vue'
// }
// }
const resMsg = {
onFulfilled(response) {
let {code,msg} = response.data
if(code === 9001 || code === 9002){
message.error({
content:msg,
maxCount:1,
})
setTimeout(()=>{
location.href = process.env.VUE_APP_API_portal_URL + "/#/"
},2000)
}else if(code === -1){
message.error({
content:msg,
maxCount:1,
})
}
return response
let { code, msg } = response.data;
if (code === 9001 || code === 9002) {
message.error({
content: msg,
maxCount: 1,
});
setTimeout(() => {
location.href = process.env.VUE_APP_API_portal_URL + "/#/";
}, 2000);
} else if (code === -1) {
message.error({
content: msg,
maxCount: 1,
});
}
return response;
},
onRejected(error) {
// const {message} = options
......@@ -59,9 +58,9 @@ const resMsg = {
// if (response.code === 403) {
// message.error('请求被拒绝')
// }
return Promise.reject(error)
}
}
return Promise.reject(error);
},
};
const reqCommon = {
/**
......@@ -72,11 +71,11 @@ const reqCommon = {
*/
onFulfilled(config) {
// 携带token
let token = local.getLocal('token')
if(token){
config.headers.Authorization=token
let token = local.getLocal("token");
if (token) {
config.headers.Authorization = token;
}
return config
return config;
},
/**
* 请求出错时做点什么
......@@ -87,12 +86,12 @@ const reqCommon = {
onRejected(error) {
// const {message} = options
// message.error(error.message)
return Promise.reject(error)
}
}
return Promise.reject(error);
},
};
export default {
request: [reqCommon], // 请求拦截
// 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