|
|
|
@ -107,17 +107,17 @@
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="选择原因一" align="center" prop="choiceOne" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<a :href="scope.row.choiceOne">{{scope.row.choiceOne}}</a> |
|
|
|
|
<a :href="scope.row.choiceOne">{{scope.row.choiceOne | ellipsis }}</a> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="选择原因二" align="center" prop="choiceTwo" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<a :href="scope.row.choiceTwo">{{scope.row.choiceTwo}}</a> |
|
|
|
|
<a :href="scope.row.choiceTwo">{{scope.row.choiceTwo | ellipsis }}</a> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="选择原因三" align="center" prop="choiceThree" min-width="120"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<a :href="scope.row.choiceThree">{{scope.row.choiceThree}}</a> |
|
|
|
|
<a :href="scope.row.choiceThree">{{scope.row.choiceThree | ellipsis}}</a> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- <el-table-column label="创建时间" align="center" prop="createdTime" width="50">--> |
|
|
|
@ -160,7 +160,7 @@
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<!-- 添加或修改关于我们对话框 --> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body @close="handleCanCle"> |
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
|
|
|
|
<el-form-item label="标题" prop="title"> |
|
|
|
|
<el-input v-model="form.title" placeholder="请输入标题" /> |
|
|
|
@ -234,13 +234,20 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="选择我们原因一" prop="choiceOne"> |
|
|
|
|
<el-input v-model="form.choiceOne" placeholder="请输入选择我们原因"/> |
|
|
|
|
<el-input v-model="form.choiceOne" placeholder="请输入选择我们原因" type="textarea" |
|
|
|
|
resize="none" |
|
|
|
|
:autosize="{ minRows: 4, maxRows: 4 }" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="选择我们原因二" prop="choiceTwo"> |
|
|
|
|
<el-input v-model="form.choiceTwo" placeholder="请输入选择我们原因"/> |
|
|
|
|
<el-input v-model="form.choiceTwo" placeholder="请输入选择我们原因" type="textarea" |
|
|
|
|
resize="none" |
|
|
|
|
:autosize="{ minRows: 4, maxRows: 4 }"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="选择我们原因三" prop="choiceThree"> |
|
|
|
|
<el-input v-model="form.choiceThree" placeholder="请输入选择我们原因"/> |
|
|
|
|
<el-input v-model="form.choiceThree" placeholder="请输入选择我们原因" type="textarea" |
|
|
|
|
resize="none" |
|
|
|
|
:autosize="{ minRows: 4, maxRows: 4 }"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
@ -346,6 +353,16 @@ export default {
|
|
|
|
|
created() { |
|
|
|
|
this.getList(); |
|
|
|
|
}, |
|
|
|
|
filters:{ |
|
|
|
|
ellipsis(value){ |
|
|
|
|
if (!value) return ''; |
|
|
|
|
if (value.length > 10) { |
|
|
|
|
return value.slice(0,40) + '...' |
|
|
|
|
} |
|
|
|
|
return value |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
computed: { |
|
|
|
|
headers() { |
|
|
|
|
return { |
|
|
|
@ -361,11 +378,17 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
handleCanCle () { |
|
|
|
|
this.srcList = []; |
|
|
|
|
this.$refs.upload.clearFiles() |
|
|
|
|
console.log(this.$refs.upload.clearFiles()) |
|
|
|
|
this.cancel(); |
|
|
|
|
}, |
|
|
|
|
/** 查询关于我们列表 */ |
|
|
|
|
getList() { |
|
|
|
|
this.loading = true; |
|
|
|
|
listUs(this.queryParams).then(response => { |
|
|
|
|
|
|
|
|
|
console.log( response.rows); |
|
|
|
|
response.rows.forEach(item =>{ |
|
|
|
|
let picture = item.pictureUrl; |
|
|
|
|
|
|
|
|
@ -396,6 +419,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
// 取消按钮 |
|
|
|
|
cancel() { |
|
|
|
|
this.imgList = []; |
|
|
|
|
this.open = false; |
|
|
|
|
this.reset(); |
|
|
|
|
}, |
|
|
|
@ -438,7 +462,7 @@ export default {
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
|
handleAdd() { |
|
|
|
|
this.reset(); |
|
|
|
|
//console.log(this.usList ) |
|
|
|
|
console.log(this.usList ) |
|
|
|
|
if(this.usList.length > 0){ |
|
|
|
|
this.$message.warning("当前内容已添加,请修改需要改动的消息!"); |
|
|
|
|
}else{ |
|
|
|
@ -446,12 +470,16 @@ export default {
|
|
|
|
|
this.title = "添加关于我们"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// this.open = true; |
|
|
|
|
// this.title = "添加关于我们"; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row) { |
|
|
|
|
this.imgList = []; |
|
|
|
|
this.reset(); |
|
|
|
|
console.log(row) |
|
|
|
|
// this.imgList = []; |
|
|
|
|
// console.log(this.imgList); |
|
|
|
|
// this.reset(); |
|
|
|
|
// console.log(row) |
|
|
|
|
const id = row.id || this.ids |
|
|
|
|
getUs(id).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
@ -469,6 +497,7 @@ export default {
|
|
|
|
|
let obj = {} |
|
|
|
|
obj.url = t |
|
|
|
|
this.imgList.push(obj) |
|
|
|
|
console.log(this.imgList); |
|
|
|
|
} |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "修改关于我们"; |
|
|
|
|