diff --git a/src/components/modules/content.vue b/src/components/modules/content.vue
index 09695bd..87010cd 100644
--- a/src/components/modules/content.vue
+++ b/src/components/modules/content.vue
@@ -28,7 +28,7 @@
api-key='rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda'
v-model="data.form[item.prop]"
:init="editorConfig" />
- 只支持.jpg,.png格式
-
@@ -144,7 +146,9 @@ export default {
file: {}, // 当前被选择的图片文件
curForm: {},
fixed: false,
- fixedNumber: [0.88, 1]
+ fixedNumber: [0.88, 1],
+ autoCropWidth: 480,
+ autoCropHeight: 124,
};
},
watch: {
@@ -160,16 +164,15 @@ export default {
// 处理form表单参数
handleForm () {
const { forms, type } = this.data
+ this.fixed = false
// 这两张类型的模块才需要处理参数
- if (type === 'form' || type === 'introduce') {
+ if (forms) {
forms.map(e => {
- if (e.type === 'upload') {
- if (e.fixedNumber) {
- this.fixed = true
- this.fixedNumber = e.fixedNumber
- } else {
- this.fixed = false
- }
+ if (e.type === 'upload' && e.width) {
+ this.autoCropWidth = e.width
+ this.autoCropHeight = e.height
+ this.fixed = true
+ this.fixedNumber = [e.width / e.height, 1]
}
if (e.required) {
this.rules[e.prop] = [
diff --git a/src/components/modules/history.vue b/src/components/modules/history.vue
index 9bd9a00..9f2c7bd 100644
--- a/src/components/modules/history.vue
+++ b/src/components/modules/history.vue
@@ -38,11 +38,6 @@
{{ scope.row.link.linkName }}
- 设置链接
@@ -122,6 +117,7 @@ export default {
// 编辑内容
editHistory (row, i = 0) {
this.data.form = JSON.parse(JSON.stringify(row))
+ if (!this.data.labelWidth) this.data.labelWidth = '60px'
this.curModule = i
this.contentVisible = true
},
diff --git a/src/components/modules/module.vue b/src/components/modules/module.vue
index 117ea87..17f53fd 100644
--- a/src/components/modules/module.vue
+++ b/src/components/modules/module.vue
@@ -1,50 +1,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -60,7 +26,7 @@
min-width="130"
align="center">
-
{{ scope.row.link.linkName }}
@@ -75,12 +41,11 @@
{{ scope.row[item.prop] }}
-
@@ -90,6 +55,14 @@
+
+
+
+
@@ -333,6 +306,7 @@ export default {
token: Util.local.get(Setting.tokenKey)
},
isVideo: Util.isVideo,
+ dialogWidth: '800px',
rules: {},
linkVisible: false,
linkForm: {},
@@ -404,7 +378,8 @@ export default {
]),
// 处理form表单参数
handleForm () {
- const { type, forms, form } = this.data
+ const { type, forms, form, dialogWidth } = this.data
+ this.fixed = false
if (type === 'form' || type === 'forms') {
forms.map(e => {
if (e.type === 'video' || e.type === 'media') {
@@ -449,7 +424,7 @@ export default {
this.articleNums = nums
}
form && form.site && this.siteChange(form.site)
- console.log(333, this.fixedNumber)
+ this.dialogWidth = dialogWidth || '800px'
},
// 站点切换回调
siteChange (siteId) {
@@ -484,9 +459,7 @@ export default {
// 添加行
addRow () {
const { type } = this.data
- if (type === 'customList') {
- this.data.list.push(JSON.parse(JSON.stringify(this.data.originForm)))
- } else if (type === 'history') {
+ if (type === 'history') {
this.data.list.push(JSON.parse(JSON.stringify(this.data.historyForm)))
} else {
this.editIntro(this.data.originForm, -1)
@@ -561,6 +534,11 @@ export default {
form[prop] = ''
form.fileName = ''
},
+ // 排序
+ sort (type, i) {
+ const item = this.data.list.splice(i, 1)[0]
+ this.data.list.splice(i + (type ? 1 : -1), 0, item)
+ },
// 删除行(通用)
delRow (list, i) {
this.$confirm('确定要删除吗?', '提示', {
diff --git a/src/const/modules.js b/src/const/modules.js
index c753bca..3c5d70c 100644
--- a/src/const/modules.js
+++ b/src/const/modules.js
@@ -3985,7 +3985,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 1920,
+ height: 345
},
{
type: 'input',
@@ -5604,7 +5606,8 @@ export default {
prop: 'pic',
label: '图片',
required: true,
- crop: false
+ width: 1920,
+ height: 991
},
{
type: 'link',
@@ -5703,7 +5706,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 700,
+ height: 543
},
{
type: 'input',
@@ -5810,7 +5815,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 1920,
+ height: 480
},
{
type: 'input',
@@ -5869,7 +5876,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 1920,
+ height: 480
},
{
type: 'input',
@@ -5912,7 +5921,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 392,
+ height: 247
},
{
type: 'input',
@@ -5958,7 +5969,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 1920,
+ height: 480
},
{
type: 'input',
@@ -6016,7 +6029,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: false
+ required: false,
+ width: 1100,
+ height: 812
},
],
form: {
@@ -6032,7 +6047,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 1920,
+ height: 480
},
{
type: 'input',
@@ -6069,7 +6086,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 848,
+ height: 505
},
{
type: 'input',
@@ -6114,7 +6133,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 848,
+ height: 505
},
{
type: 'input',
@@ -6159,7 +6180,9 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
- required: true
+ required: true,
+ width: 848,
+ height: 505
},
{
type: 'input',
@@ -8787,7 +8810,7 @@ export default {
}
},
{
- type: 'customList',
+ type: 'introduce',
forms: [
{
type: 'input',
@@ -8824,9 +8847,9 @@ export default {
list: [
{
dep: '',
- dep: '',
- phone: '',
- email: '',
+ contacts: '',
+ phone: '',
+ email: '',
isEnable: 1
}
]
@@ -9028,7 +9051,9 @@ export default {
isEnable: 1,
}
],
- labelWidth: '120px'
+ labelWidth: '120px',
+ dialogWidth: '1200px',
+ sort: true
},
{
type: 'introduce',
@@ -9200,7 +9225,7 @@ export default {
}
},
{
- type: 'forms',
+ type: 'introduce',
forms: [
{
type: 'upload',
@@ -9305,7 +9330,8 @@ export default {
des: `杨学明作为院领导,负责组织制定研究院的战略规划与实施监督,分管人才队伍建设、财务管理等方面工作,同时作为总指挥、总负责人,主持建设深圳产业光源项目。孙冬柏曾任中山大学常务副校长,层主持建设了“十一五”国家重大科技基础设施“重大工程材料服役安全研究评价设施”暨国家材料服役安全科学中心;担任分总体负责人,负责研制建设了“十二五”国家重大科技基础设施“高能同步辐射光源验证装置”—工程材料线站。`,
isEnable: 1
}
- ]
+ ],
+ dialogWidth: '1200px',
},
],
iasf: [
diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js
index 31b4361..41a71ae 100644
--- a/src/mixins/page/index.js
+++ b/src/mixins/page/index.js
@@ -8,7 +8,7 @@ export default {
userId: +this.$store.state.user.userId,
site: this.$store.state.content.site,
columnId: +this.$route.query.id,
- withOriginForm: ['introduce', 'history', 'label', 'customList'], // 要添加origiinForm的模块类型
+ withOriginForm: ['introduce', 'history'], // 要添加origiinForm的模块类型
id: '',
modules: [],
originModules: '[]',
diff --git a/src/pages/column/page/team.vue b/src/pages/column/page/team.vue
index cf1e843..33d09d7 100644
--- a/src/pages/column/page/team.vue
+++ b/src/pages/column/page/team.vue
@@ -28,7 +28,7 @@
-
+
-
点击更换图片、标题、描述
+
点击更换图片、标题、描述