提交 f846ac36 authored 作者: lihuihui's avatar lihuihui

update

上级 1ecb4e28
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
</div> </div>
<div class="tool-item" v-if="item.name === 'width'"> <div class="tool-item" v-if="item.name === 'width'">
<div class="tit"></div> <div class="tit"></div>
<el-input @input="changeStyle" v-model="item.value" placeholder="请输入数字"></el-input> <el-input v-if="item.disabled" :disabled="true" @input="changeStyle" v-model="item.value" placeholder="请输入数字"></el-input>
<el-input v-else @input="changeStyle" v-model="item.value" placeholder="请输入数字"></el-input>
</div> </div>
<div class="tool-item" v-if="item.name === 'height'"> <div class="tool-item" v-if="item.name === 'height'">
<div class="tit"></div> <div class="tit"></div>
......
...@@ -26,11 +26,12 @@ export default { ...@@ -26,11 +26,12 @@ export default {
'undo redo | fontsizeselect lineheight bold italic underline strikethrough forecolor backcolor | link quickimage image media table | align hangingindent indent outdent numlist bullist | charmap blockquote hr fullscreen | code preview', 'undo redo | fontsizeselect lineheight bold italic underline strikethrough forecolor backcolor | link quickimage image media table | align hangingindent indent outdent numlist bullist | charmap blockquote hr fullscreen | code preview',
// font_formats: // font_formats:
// '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Times New Roman', // '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Times New Roman',
fontsize_formats: '8px 10px 12px 14px 15px 16px 17px 18px 20px 24px', fontsize_formats:
lineheight_formats: '0.5 1 1.2 1.5 2', '12px 14px 16px 18px 20px 22px 24px 26px 28px 30px 32px 34px 36px 38px 40px 42px 44px 46px 48px 50px',
// lineheight_formats: '0.5 1 1.2 1.5 2',
images_upload_handler: ImageUpload, images_upload_handler: ImageUpload,
automatic_uploads: true, automatic_uploads: true,
quickbars_insert_toolbar: false, quickbars_insert_toolbar: true,
// style_formats: [{ title: '悬挂缩进', block: 'p', styles: { textIndent: '-2em', paddingLeft: '2em' } }], // style_formats: [{ title: '悬挂缩进', block: 'p', styles: { textIndent: '-2em', paddingLeft: '2em' } }],
content_style: 'img {max-width:100%;}' content_style: 'img {max-width:100%;}'
} }
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
</div> </div>
<div style="display: flex; justify-content: center; padding: 30px"> <div style="display: flex; justify-content: center; padding: 30px">
<el-button type="primary" @click="submit()">提 交</el-button> <el-button type="primary" @click="submit()">提 交</el-button>
<el-button type="primary" @click="$router.go(-1)">返 回</el-button>
</div> </div>
</div> </div>
<el-dialog title="添加元素" :visible.sync="dialogVisible" width="30%" :destroy-on-close="true"> <el-dialog title="添加元素" :visible.sync="dialogVisible" width="30%" :destroy-on-close="true">
...@@ -125,8 +126,8 @@ export default { ...@@ -125,8 +126,8 @@ export default {
type: '-1', type: '-1',
title: '证书设置', title: '证书设置',
tool: [ tool: [
{ name: 'proportionWidth', value: 2, option: [1, 20, 1] }, { name: 'width', value: 860 },
{ name: 'proportionHeight', value: 1, option: [1, 20, 1] } { name: 'height', value: 400 }
], ],
style: '' style: ''
}, },
...@@ -462,8 +463,9 @@ export default { ...@@ -462,8 +463,9 @@ export default {
} }
} }
.edit-cert-box { .edit-cert-box {
width: 1200px;
margin: 30px auto;
display: flex; display: flex;
padding-top: 30px;
} }
.tool-left { .tool-left {
min-width: 340px; min-width: 340px;
......
<template> <template>
<div class="create-box"> <div class="create-box">
<app-card :title="!$route.query.id ? '新建模板' : '编辑模板'"> <app-card :title="!$route.query.id ? '新建模板' : '编辑模板'">
<!-- <el-steps :active="active" finish-status="success">
<el-step title="步骤 1"></el-step>
<el-step title="步骤 2"></el-step>
</el-steps>
<div class="step-one" v-if="active === 0">
<el-form ref="form" :model="form" style="width: 50%; margin: 0 auto" label-width="100px">
<el-form-item label="模板名称">
<el-input v-model="form.title"></el-input>
</el-form-item>
<el-form-item label="编号生成规则">
<el-radio-group v-model="form.rule">
<el-radio label="0">规则一</el-radio>
<el-radio label="1">规则二</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="active = 1">下一步</el-button>
<el-button @click="$router.go(-1)">取消</el-button>
</el-form-item>
</el-form>
</div> -->
<template v-if="$route.query.id"> <template v-if="$route.query.id">
<stepTwo @submit="submit" v-if="Object.keys(step2Data).length" :data="step2Data"></stepTwo> <stepTwo @submit="submit" v-if="Object.keys(step2Data).length" :data="step2Data"></stepTwo>
</template> </template>
<template v-else> <template v-else>
<stepTwo @submit="submit" :data="step2Data"></stepTwo> <stepTwo @submit="submit" :data="step2Data"></stepTwo>
</template> </template>
<!-- <div class="step-two" v-if="active === 1">
</div> -->
</app-card> </app-card>
</div> </div>
</template> </template>
...@@ -37,12 +14,9 @@ ...@@ -37,12 +14,9 @@
<script> <script>
import stepTwo from '../components/stepTwo.vue' import stepTwo from '../components/stepTwo.vue'
import { createTemplate, getDetails, updateTemplate } from '../api' import { createTemplate, getDetails, updateTemplate } from '../api'
// import UploadImage from '@/components/upload/UploadImage.vue'
// import { createBanner, getDetails, updateBanner } from '../api'
export default { export default {
components: { components: {
stepTwo stepTwo
// UploadImage
}, },
data() { data() {
return { return {
...@@ -51,7 +25,8 @@ export default { ...@@ -51,7 +25,8 @@ export default {
title: '', title: '',
rule: '0' rule: '0'
}, },
step2Data: {} step2Data: {},
loading: null
} }
}, },
computed: { computed: {
...@@ -59,13 +34,23 @@ export default { ...@@ -59,13 +34,23 @@ export default {
return this.$route.query.id return this.$route.query.id
} }
}, },
created() {
if (this.id) {
this.loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.9)'
})
}
},
methods: { methods: {
submit(data) { submit(data) {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.9)'
}) })
if (this.$route.query.id) { if (this.$route.query.id) {
data.id = this.$route.query.id data.id = this.$route.query.id
...@@ -104,6 +89,7 @@ export default { ...@@ -104,6 +89,7 @@ export default {
rule: data.rule rule: data.rule
} }
this.step2Data = JSON.parse(data.info) this.step2Data = JSON.parse(data.info)
this.loading.close()
}) })
} }
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论