wangqing 4 years ago
parent
commit
e2826746c3
  1. 44
      src/assets/styles/elementui-mobile.scss
  2. 1
      src/components/form/ProvinceCity/index.vue
  3. 7
      src/views/form/index.vue
  4. 31
      src/views/form/preview/ProjectForm.vue
  5. 2
      src/views/form/preview/index.vue
  6. 2
      src/views/official/index.vue

44
src/assets/styles/elementui-mobile.scss

@ -0,0 +1,44 @@
@media screen and (max-width: 500px) {
.el-message {
min-width: 300px !important;
}
.el-message-box {
width: 300px !important;
}
//! 日期范围兼容移动端
.el-date-range-picker__content{
float: none!important;
width: 100% !important;
}
.el-date-range-picker__content.is-left .el-picker-panel__icon-btn{
float: right!important;
}
.el-date-editor .el-range-separator{
padding: 0!important;
}
.el-date-range-picker .el-picker-panel__body{
min-width: 320px!important;
}
.el-date-range-picker{
width: 100%!important;
}
.el-date-table td{
width: 20px!important;
padding:0px!important;
}
.el-date-range-picker table{
width: 320px!important;
}
//# 日期范围兼容移动端
.el-dialog__wrapper .el-dialog {
width: 300px !important;
.el-dialog__body {
padding: 10px 20px !important;
.el-form-item__label {
width: 68px !important;
}
}
}
}

1
src/components/form/ProvinceCity/index.vue

@ -4,6 +4,7 @@
v-model="value" v-model="value"
:options="options" :options="options"
:props="props" :props="props"
clearable
@change="changeHandle" @change="changeHandle"
/> />
</div> </div>

7
src/views/form/index.vue

@ -14,7 +14,7 @@
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
<el-button type="success" icon="el-icon-folder-add"> <el-button type="success" icon="el-icon-folder-add" @click="saveProjectAsTemplateHandle">
保存为模板 保存为模板
</el-button> </el-button>
</el-col> </el-col>
@ -100,9 +100,8 @@ export default {
this.$router.replace({path: index, query: {key: this.projectKey}}) this.$router.replace({path: index, query: {key: this.projectKey}})
}, },
saveProjectAsTemplateHandle() { saveProjectAsTemplateHandle() {
// Id this.$api.post('/user/project/template/save', {key: this.projectKey}).then(() => {
this.$api.get('/user/project/item/max-form-id', {params: {key: this.projectKey}}).then(res => { this.msgSuccess('保存成功')
this.idGlobal = res.data ? res.data : 100
}) })
}, },
collapseHandle() { collapseHandle() {

31
src/views/form/preview/ProjectForm.vue

@ -106,6 +106,7 @@ export default {
beforeCreate() { beforeCreate() {
document.querySelector('body').className = 'project-body' document.querySelector('body').className = 'project-body'
}, },
created() { created() {
if (this.projectConfig && this.projectConfig.projectKey) { if (this.projectConfig && this.projectConfig.projectKey) {
this.formConf.projectKey = this.projectConfig.projectKey this.formConf.projectKey = this.projectConfig.projectKey
@ -157,6 +158,7 @@ export default {
} }
if (res.data.project) { if (res.data.project) {
this.formConf.title = res.data.project.name this.formConf.title = res.data.project.name
document.title = res.data.project.name
this.formConf.description = res.data.project.describe this.formConf.description = res.data.project.describe
} }
this.formConf.logicShowRule = this.logicShowTriggerRule this.formConf.logicShowRule = this.logicShowTriggerRule
@ -268,7 +270,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/assets/styles/elementui-mobile.scss';
.project-form { .project-form {
margin: 15px auto; margin: 15px auto;
width: 800px; width: 800px;
@ -315,31 +317,4 @@ export default {
width: 80%; width: 80%;
} }
} }
@media screen and (max-width: 500px) {
.el-message {
min-width: 300px !important;
}
.el-message-box {
width: 300px !important;
}
//!
//.el-date-range-picker__content{
// float: none!important;
// width: 100% !important;
//}
//#
.el-dialog__wrapper .el-dialog {
width: 300px !important;
.el-dialog__body {
padding: 10px 20px !important;
.el-form-item__label {
width: 68px !important;
}
}
}
}
</style> </style>

2
src/views/form/preview/index.vue

@ -64,7 +64,7 @@ export default {
mounted() { mounted() {
this.projectKey = this.$route.query.key this.projectKey = this.$route.query.key
let url = window.location.protocol + '//' + window.location.host let url = window.location.protocol + '//' + window.location.host
this.mobilePreviewUrl = `${url}/project/view?key=${this.projectKey}` this.mobilePreviewUrl = `${url}/s/${this.projectKey}`
this.$set(this.projectConfig, 'projectKey', this.projectKey) this.$set(this.projectConfig, 'projectKey', this.projectKey)
} }
} }

2
src/views/official/index.vue

@ -27,7 +27,7 @@
<div class="content-header"> <div class="content-header">
<div class="left"> <div class="left">
<p class="slogan animate__animated animate__fadeInLeftBig"> <p class="slogan animate__animated animate__fadeInLeftBig">
填鸭待定SLOGAN 让企业轻松拥有问卷系统
</p> </p>
<p class="slogan-desc animate__animated animate__fadeInLeftBig"> <p class="slogan-desc animate__animated animate__fadeInLeftBig">
TDuck - Have what you want, TDuck - Have what you want,

Loading…
Cancel
Save