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"
:options="options"
:props="props"
clearable
@change="changeHandle"
/>
</div>

7
src/views/form/index.vue

@ -14,7 +14,7 @@
</el-button>
</el-col>
<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-col>
@ -100,9 +100,8 @@ export default {
this.$router.replace({path: index, query: {key: this.projectKey}})
},
saveProjectAsTemplateHandle() {
// Id
this.$api.get('/user/project/item/max-form-id', {params: {key: this.projectKey}}).then(res => {
this.idGlobal = res.data ? res.data : 100
this.$api.post('/user/project/template/save', {key: this.projectKey}).then(() => {
this.msgSuccess('保存成功')
})
},
collapseHandle() {

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

@ -106,6 +106,7 @@ export default {
beforeCreate() {
document.querySelector('body').className = 'project-body'
},
created() {
if (this.projectConfig && this.projectConfig.projectKey) {
this.formConf.projectKey = this.projectConfig.projectKey
@ -157,6 +158,7 @@ export default {
}
if (res.data.project) {
this.formConf.title = res.data.project.name
document.title = res.data.project.name
this.formConf.description = res.data.project.describe
}
this.formConf.logicShowRule = this.logicShowTriggerRule
@ -268,7 +270,7 @@ export default {
</script>
<style lang="scss">
@import '@/assets/styles/elementui-mobile.scss';
.project-form {
margin: 15px auto;
width: 800px;
@ -315,31 +317,4 @@ export default {
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>

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

@ -64,7 +64,7 @@ export default {
mounted() {
this.projectKey = this.$route.query.key
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)
}
}

2
src/views/official/index.vue

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

Loading…
Cancel
Save