Commit 8e989b63 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents f1146d67 9a335da8
...@@ -99,9 +99,14 @@ ...@@ -99,9 +99,14 @@
resize: none; resize: none;
} }
.ant-btn-primary { .ant-btn-primary {
background: linear-gradient(90deg, #5ab6ff, #2e9aff) !important; background: linear-gradient(90deg, #5ab6ff, #2e9aff) ;
border: none !important; border: none ;
border-color: transparent !important; border-color: transparent ;
&:hover,&:focus{
background: linear-gradient(90deg, #5ab6ff, #2e9aff) ;
border: none ;
border-color: transparent ;
}
} }
.ant-form-explain { .ant-form-explain {
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
<a-input v-model="v.value" placeholder="请输入值" /> <a-input v-model="v.value" placeholder="请输入值" />
</a-space> </a-space>
</div> </div>
<a-button type="primary" @click="insertion(i)" <a-button type="primary" @click="insertion(i, 'fieldType')"
><a-icon type="plus" ><a-icon type="plus"
/></a-button> /></a-button>
<a-button type="danger" @click="delrow(i)" <a-button type="danger" @click="delrow(i, 'fieldType')"
><a-icon type="minus" ><a-icon type="minus"
/></a-button> /></a-button>
</a-space> </a-space>
...@@ -100,10 +100,10 @@ ...@@ -100,10 +100,10 @@
<a-input v-model="v.value" placeholder="请输入映射字段" /> <a-input v-model="v.value" placeholder="请输入映射字段" />
</a-space> </a-space>
</div> </div>
<a-button type="primary" @click="insertion(i, 'params')" <a-button type="primary" @click="insertion(i, 'apiParams')"
><a-icon type="plus" ><a-icon type="plus"
/></a-button> /></a-button>
<a-button type="danger" @click="delrow(i, 'params')" <a-button type="danger" @click="delrow(i, 'apiParams')"
><a-icon type="minus" ><a-icon type="minus"
/></a-button> /></a-button>
</a-space> </a-space>
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
this.$refs.form.validate(async (valid) => { this.$refs.form.validate(async (valid) => {
if (valid) { if (valid) {
let bol = this.templeteList.some((v) => v.fieldType == "table"); let bol = this.templeteList.some((v) => v.fieldType == "table");
if (bol && !this.form.id) { if (bol && !this.form.id && this.form.fieldType == "table") {
this.$message.warn("只能存在一个表格"); this.$message.warn("只能存在一个表格");
return; return;
} }
...@@ -346,8 +346,12 @@ export default { ...@@ -346,8 +346,12 @@ export default {
}); });
let res = await saveTemplete({ let res = await saveTemplete({
...this.form, ...this.form,
fieldTypeValue: fieldTypeObj ? JSON.stringify(fieldTypeObj) : "", fieldTypeValue: !this.$_.isEmpty(fieldTypeObj)
serviceApiParams: apiParamsObj ? JSON.stringify(apiParamsObj) : "", ? JSON.stringify(fieldTypeObj)
: "",
serviceApiParams: !this.$_.isEmpty(apiParamsObj)
? JSON.stringify(apiParamsObj)
: "",
}); });
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
...@@ -424,25 +428,14 @@ export default { ...@@ -424,25 +428,14 @@ export default {
key: "", key: "",
value: "", value: "",
}; };
if (type == "params") { this[type].splice(index + 1, 0, obj);
this.apiParams.splice(index + 1, 0, obj);
} else {
this.fieldType.splice(index + 1, 0, obj);
}
}, },
// 删除数据配置行数 // 删除数据配置行数
delrow(index, type) { delrow(index, type) {
if (type == "params") { if (this[type].length == 1) {
if (this.apiParams.length == 1) {
return;
}
this.apiParams.splice(index, 1);
} else {
if (this.fieldType.length == 1) {
return; return;
} }
this.fieldType.splice(index, 1); this[type].splice(index, 1);
}
}, },
// 切换字段类型 // 切换字段类型
changeFieldType(val) { changeFieldType(val) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 评价器 横板皮肤 --> <!-- 评价器 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 呼叫器 横板皮肤 --> <!-- 呼叫器 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="call-out-skin-across" class="call-out-skin-across"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 集中显示屏 横板 --> <!-- 集中显示屏 横板 -->
<div <div
class="centralize-across" class="centralize-across"
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<!-- 集中显示屏 竖版 --> <!-- 集中显示屏 竖版 -->
<div <div
class="vertical-skin" class="vertical-skin"
:id="conponentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -301,7 +301,7 @@ export default { ...@@ -301,7 +301,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="show-skin flex aic jcc"> <div class="show-skin flex aic jcc">
<component <component
conponentsId="skinInfo" componentsId="skinInfo"
:is="component" :is="component"
:imageResolution="curSkin.imageResolution" :imageResolution="curSkin.imageResolution"
:skinFieldList="curSkin.skinFieldList" :skinFieldList="curSkin.skinFieldList"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 桌面自助服务终端 横板 --> <!-- 桌面自助服务终端 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 信息发布 横板皮肤 --> <!-- 信息发布 横板皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="across-skin flex flexc" class="across-skin flex flexc"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
> >
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
<!-- 信息发布 竖版皮肤 --> <!-- 信息发布 竖版皮肤 -->
<div <div
:id="conponentsId" :id="componentsId"
class="vertical-skin flex flexc" class="vertical-skin flex flexc"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
> >
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="add-surface-preview"> <div class="add-surface-preview">
<div ref="content" class="add-surface-preview-content"> <div ref="content" class="add-surface-preview-content">
<component <component
conponentsId="conponentsId" componentsId="componentsId"
:is="component" :is="component"
:skinFieldList="formData.skinFieldList" :skinFieldList="formData.skinFieldList"
:imageResolution="formData.imageResolution" :imageResolution="formData.imageResolution"
...@@ -401,11 +401,11 @@ export default { ...@@ -401,11 +401,11 @@ export default {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
let conponentsId = document.getElementById("conponentsId"); let componentsId = document.getElementById("componentsId");
let info = conponentsId.getBoundingClientRect(); let info = componentsId.getBoundingClientRect();
let width = info.width; let width = info.width;
let height = info.height; let height = info.height;
html2canvas(conponentsId, { html2canvas(componentsId, {
backgroundColor: null, backgroundColor: null,
useCORS: true, useCORS: true,
width: width, width: width,
...@@ -529,9 +529,9 @@ export default { ...@@ -529,9 +529,9 @@ export default {
} }
.upload-btn, .upload-btn,
.select-color-btn { .select-color-btn {
background-color: #04cb8f; background: #04cb8f !important;
color: #fff; color: #fff;
border: 1px solid #04cb8f; border: 1px solid #04cb8f !important;
} }
.color-ipt { .color-ipt {
width: 100%; width: 100%;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 排号机 1920*1080 --> <!-- 排号机 1920*1080 -->
<div <div
:id="conponentsId" :id="componentsId"
class="across-skin" class="across-skin"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<!-- 排号机竖版 1080*1920 --> <!-- 排号机竖版 1080*1920 -->
<div <div
class="vertical-skin" class="vertical-skin"
:id="conponentsId" :id="componentsId"
v-else-if="imageResolution === '2'" v-else-if="imageResolution === '2'"
:style="{ :style="{
background: filterItem('1', 0), background: filterItem('1', 0),
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 样表机 横板 --> <!-- 样表机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 自助服务终端 横板 --> <!-- 自助服务终端 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
:style="{ :style="{
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 导视机 横板 --> <!-- 导视机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="across-skin flex flexc aic" class="across-skin flex flexc aic"
> >
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 窗口屏 横板 --> <!-- 窗口屏 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
class="window-skin-across flex jcb aic" class="window-skin-across flex jcb aic"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
:style="{ :style="{
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="skin-box"> <div class="skin-box">
<!-- 样表机 横板 --> <!-- 样表机 横板 -->
<div <div
:id="conponentsId" :id="componentsId"
v-if="imageResolution === '1'" v-if="imageResolution === '1'"
class="sample_form_skin flex flexc aic" class="sample_form_skin flex flexc aic"
:style="{ :style="{
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
required: true, required: true,
default: "1", default: "1",
}, },
conponentsId: { componentsId: {
required: true, required: true,
type: String, type: String,
}, },
......
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