优化全局系统设置
This commit is contained in:
parent
21f049f65c
commit
15354833e2
|
|
@ -9,11 +9,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="value" label="内容" width="500">
|
<el-table-column prop="value" label="内容" width="500">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否返回给App">
|
<el-table-column label="是否返回给App" prop="isAppUse" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.isAppUse"
|
<!-- <el-switch v-model="scope.row.isAppUse" @change="updateAmendNotice($event, scope.row)"
|
||||||
@change="updateAmendNotice($event,scope.row)"
|
:active-value="1" :inactive-value="0"></el-switch> -->
|
||||||
:active-value="1" :inactive-value="0"></el-switch>
|
{{ scope.row.isAppUse == 1 ? '是' : '否' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createAt" label="创建时间">
|
<el-table-column prop="createAt" label="创建时间">
|
||||||
|
|
@ -35,7 +35,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="value" label="内容" width="500">
|
<el-table-column prop="value" label="内容" width="500">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div>
|
<div
|
||||||
|
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
|
||||||
|
{{ scope.row.value }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createAt" label="创建时间">
|
<el-table-column prop="createAt" label="创建时间">
|
||||||
|
|
@ -114,8 +116,8 @@
|
||||||
<el-table-column prop="value" label="内容" width="500">
|
<el-table-column prop="value" label="内容" width="500">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;overflow: hidden;">
|
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;line-clamp: 4;overflow: hidden;">
|
||||||
{{scope.row.value}}</div>
|
{{ scope.row.value }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="createAt" label="创建时间">
|
<el-table-column prop="createAt" label="创建时间">
|
||||||
|
|
@ -168,48 +170,52 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="文件上传配置" name="wenjian">
|
<el-tab-pane label="文件上传配置" name="wenjian">
|
||||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="min" label="类型">
|
<el-table-column prop="min" label="类型">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="value" label="内容" width="500">
|
<el-table-column prop="value" label="内容" width="500">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div>
|
<div
|
||||||
</template>
|
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
|
||||||
</el-table-column>
|
{{ scope.row.value }}</div>
|
||||||
<el-table-column prop="createAt" label="创建时间">
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" prop="id" width="120">
|
<el-table-column prop="createAt" label="创建时间">
|
||||||
<template slot-scope="scope">
|
</el-table-column>
|
||||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
<el-table-column label="操作" prop="id" width="120">
|
||||||
@click="amend(scope.$index, scope.row)">编辑
|
<template slot-scope="scope">
|
||||||
</el-button>
|
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||||
</template>
|
@click="amend(scope.$index, scope.row)">编辑
|
||||||
</el-table-column>
|
</el-button>
|
||||||
</el-table>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="协议配置" name="xieyi">
|
<el-tab-pane label="协议配置" name="xieyi">
|
||||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="min" label="类型">
|
<el-table-column prop="min" label="类型">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="value" label="内容" width="500">
|
<el-table-column prop="value" label="内容" width="500">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">{{scope.row.value}}</div>
|
<div
|
||||||
</template>
|
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
|
||||||
</el-table-column>
|
{{ scope.row.value }}</div>
|
||||||
<el-table-column prop="createAt" label="创建时间">
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" prop="id" width="120">
|
<el-table-column prop="createAt" label="创建时间">
|
||||||
<template slot-scope="scope">
|
</el-table-column>
|
||||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
<el-table-column label="操作" prop="id" width="120">
|
||||||
@click="amend(scope.$index, scope.row)">编辑
|
<template slot-scope="scope">
|
||||||
</el-button>
|
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||||
</template>
|
@click="amend(scope.$index, scope.row)">编辑
|
||||||
</el-table-column>
|
</el-button>
|
||||||
</el-table>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="开关配置" name="kaiguan">
|
<el-tab-pane label="开关配置" name="kaiguan">
|
||||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||||
|
|
@ -239,8 +245,8 @@
|
||||||
<el-table-column prop="value" label="内容">
|
<el-table-column prop="value" label="内容">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div
|
<div
|
||||||
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;">
|
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;line-clamp: 3;overflow: hidden;max-height:80px;">
|
||||||
{{scope.row.value}}
|
{{ scope.row.value }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -263,19 +269,22 @@
|
||||||
<el-input v-model="form.min" style="width:65%;" readonly></el-input>
|
<el-input v-model="form.min" style="width:65%;" readonly></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="内容:" :label-width="formLabelWidth">
|
<el-form-item label="内容:" :label-width="formLabelWidth">
|
||||||
<quill-editor v-if="form.conditionFrom=='xieyi'" ref="myTextEditor" v-model="form.value" :options="quillOption"
|
<quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
|
||||||
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
|
:options="quillOption"
|
||||||
|
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
|
||||||
</quill-editor>
|
</quill-editor>
|
||||||
<div v-else-if="form.conditionFrom=='image'">
|
<div v-else-if="form.conditionFrom == 'image'">
|
||||||
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
|
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
|
||||||
<el-upload class="avatar-uploader" v-model="form.value"
|
<el-upload class="avatar-uploader" v-model="form.value"
|
||||||
:action="$http.adornUrlUp('alioss/upload')" :show-file-list="false"
|
:action="$http.adornUrlUp('alioss/upload')" :show-file-list="false"
|
||||||
:on-success="handleAvatarSuccess1">
|
:on-success="handleAvatarSuccess1">
|
||||||
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" />
|
<img v-if="form.value" :src="form.value" class="avatar"
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
|
style="width: 148px;height: 148px;" />
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"
|
||||||
|
style="font-size: 28px;color: #8c939d"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="form.conditionFrom=='kaiguan'">
|
<div v-else-if="form.conditionFrom == 'kaiguan'">
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group v-model="form.value">
|
<el-radio-group v-model="form.value">
|
||||||
<el-radio label="是">是</el-radio>
|
<el-radio label="是">是</el-radio>
|
||||||
|
|
@ -283,12 +292,16 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-input v-else v-model="form.value" :rows="4" style="width:65%;"></el-input>
|
<el-input v-else v-model="form.value" :rows="4" style="width:65%;"></el-input>
|
||||||
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
|
<!-- <el-input v-model="form.value" style="width:65%;"></el-input> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否返回给App" :label-width="formLabelWidth">
|
<el-form-item label="是否返回给App" :label-width="formLabelWidth">
|
||||||
<el-switch v-model="form.isAppUse" :active-value="1" :inactive-value="0"></el-switch>
|
<!-- <el-switch v-model="form.isAppUse" :active-value="1" :inactive-value="0"></el-switch> -->
|
||||||
|
<el-radio-group v-model="form.isAppUse">
|
||||||
|
<el-radio :label="1">是</el-radio>
|
||||||
|
<el-radio :label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
@ -300,264 +313,264 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
|
quillEditor
|
||||||
|
} from 'vue-quill-editor'
|
||||||
|
import 'quill/dist/quill.core.css'
|
||||||
|
import 'quill/dist/quill.snow.css'
|
||||||
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
import quillConfig from '../locality/quill-config.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
quillEditor
|
quillEditor
|
||||||
} from 'vue-quill-editor'
|
},
|
||||||
import 'quill/dist/quill.core.css'
|
data() {
|
||||||
import 'quill/dist/quill.snow.css'
|
return {
|
||||||
import 'quill/dist/quill.bubble.css'
|
quillOption: quillConfig,
|
||||||
import quillConfig from '../locality/quill-config.js'
|
openValue: '是',
|
||||||
export default {
|
closeValue: '否',
|
||||||
components: {
|
limit: 10,
|
||||||
quillEditor
|
page: 0,
|
||||||
},
|
min: '',
|
||||||
data() {
|
value: '',
|
||||||
return {
|
id: '',
|
||||||
quillOption: quillConfig,
|
condition: 'xitong',
|
||||||
openValue: '是',
|
activeName: 'first',
|
||||||
closeValue: '否',
|
dialogFormVisible: false,
|
||||||
limit: 10,
|
dialogFormVisible1: false,
|
||||||
page: 0,
|
tableDataLoading: true,
|
||||||
|
formLabelWidth: '200px',
|
||||||
|
form: {
|
||||||
|
id: '',
|
||||||
min: '',
|
min: '',
|
||||||
value: '',
|
value: '',
|
||||||
|
type: '',
|
||||||
|
isAppUse: false,
|
||||||
|
},
|
||||||
|
form2: {
|
||||||
id: '',
|
id: '',
|
||||||
condition: 'xitong',
|
min: '',
|
||||||
activeName: 'first',
|
value: '',
|
||||||
dialogFormVisible: false,
|
type: '',
|
||||||
dialogFormVisible1: false,
|
},
|
||||||
tableDataLoading: true,
|
values: [{
|
||||||
formLabelWidth: '200px',
|
value: 1,
|
||||||
form: {
|
label: '是'
|
||||||
id: '',
|
},
|
||||||
min: '',
|
{
|
||||||
value: '',
|
value: 2,
|
||||||
type: '',
|
label: '否'
|
||||||
isAppUse: false,
|
|
||||||
},
|
|
||||||
form2: {
|
|
||||||
id: '',
|
|
||||||
min: '',
|
|
||||||
value: '',
|
|
||||||
type: '',
|
|
||||||
},
|
|
||||||
values: [{
|
|
||||||
value: 1,
|
|
||||||
label: '是'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 2,
|
|
||||||
label: '否'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData: [],
|
|
||||||
checkBoxData: [] //多选框选择的值
|
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
methods: {
|
tableData: [],
|
||||||
handleSizeChange(val) {
|
checkBoxData: [] //多选框选择的值
|
||||||
this.limit = val;
|
|
||||||
this.dataSelect();
|
|
||||||
},
|
|
||||||
handleCurrentChange(val) {
|
|
||||||
this.page = val - 1;
|
|
||||||
this.dataSelect();
|
|
||||||
},
|
|
||||||
handleClick(tab, event) {
|
|
||||||
if (tab._props.label == '全局系统配置') {
|
|
||||||
this.condition = 'xitong'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '首页配置') {
|
|
||||||
this.condition = 'shouye'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '微信配置') {
|
|
||||||
this.condition = 'weixin'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '支付宝配置') {
|
|
||||||
this.condition = 'zhifubao'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '短信配置') {
|
|
||||||
this.condition = 'duanxin'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '任务系统配置') {
|
|
||||||
this.condition = 'renwu'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '文件上传配置') {
|
|
||||||
this.condition = 'oss'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '服务费配置') {
|
|
||||||
this.condition = 'fuwufei'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '协议配置') {
|
|
||||||
this.condition = 'xieyi'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '图片配置') {
|
|
||||||
this.condition = 'image'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '开关配置') {
|
|
||||||
this.condition = 'kaiguan'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
if (tab._props.label == '客服配置') {
|
|
||||||
this.condition = 'kefu'
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
// 修改弹框
|
|
||||||
amend(index, rows) {
|
|
||||||
this.dialogFormVisible = true;
|
|
||||||
this.form.id = rows.id;
|
|
||||||
this.form.type = rows.type
|
|
||||||
this.form.min = rows.min;
|
|
||||||
this.form.value = rows.value;
|
|
||||||
this.form.max = rows.max;
|
|
||||||
this.form.createAt = rows.createAt;
|
|
||||||
this.form.isAppUse = rows.isAppUse;
|
|
||||||
this.form.conditionFrom = rows.conditionFrom
|
|
||||||
},
|
|
||||||
updateAmendNotice(e,row){
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('common/update'),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData({
|
|
||||||
...row,
|
|
||||||
isAppUse: e
|
|
||||||
})
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.dataSelect()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.$message.error(data.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 修改
|
|
||||||
|
|
||||||
amendNoticeTo() {
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('common/update'),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData({
|
|
||||||
'id': this.form.id,
|
|
||||||
'type': this.form.type,
|
|
||||||
'value': this.form.value,
|
|
||||||
'min': this.form.min,
|
|
||||||
'max': this.form.max,
|
|
||||||
'createAt': this.form.createAt,
|
|
||||||
'conditionFrom': this.form.conditionFrom,
|
|
||||||
isAppUse: this.form.isAppUse
|
|
||||||
})
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.dataSelect()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
this.$message.error(data.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 修改首页
|
|
||||||
amendWhether(index, rows) {
|
|
||||||
this.dialogFormVisible1 = true;
|
|
||||||
this.form2.id = rows.id;
|
|
||||||
this.form2.type = rows.type
|
|
||||||
this.form2.min = rows.min;
|
|
||||||
this.form2.value = rows.value;
|
|
||||||
this.form2.max = rows.max;
|
|
||||||
this.form2.createAt = rows.createAt;
|
|
||||||
this.form2.conditionFrom = rows.conditionFrom
|
|
||||||
},
|
|
||||||
WhetherNoticeTo() {
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl('common/update'),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData({
|
|
||||||
'id': this.form2.id,
|
|
||||||
'type': this.form2.type,
|
|
||||||
'value': this.form2.value,
|
|
||||||
'min': this.form2.min,
|
|
||||||
'max': this.form2.max,
|
|
||||||
'createAt': this.form2.createAt,
|
|
||||||
'conditionFrom': this.form2.conditionFrom
|
|
||||||
})
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.dialogFormVisible1 = false
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.error(data.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 获取数据列表
|
|
||||||
dataSelect() {
|
|
||||||
this.tableDataLoading = true
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl(`common/type/condition/${this.condition}`),
|
|
||||||
method: 'get',
|
|
||||||
params: this.$http.adornParams({})
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.tableDataLoading = false
|
|
||||||
let returnData = data.data;
|
|
||||||
this.tableData = returnData
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleAvatarSuccess1(file, fileList) {
|
|
||||||
this.form.value = file.data
|
|
||||||
console.log('file.data',file.data)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.dataSelect()
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.limit = val;
|
||||||
|
this.dataSelect();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.page = val - 1;
|
||||||
|
this.dataSelect();
|
||||||
|
},
|
||||||
|
handleClick(tab, event) {
|
||||||
|
if (tab._props.label == '全局系统配置') {
|
||||||
|
this.condition = 'xitong'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '首页配置') {
|
||||||
|
this.condition = 'shouye'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '微信配置') {
|
||||||
|
this.condition = 'weixin'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '支付宝配置') {
|
||||||
|
this.condition = 'zhifubao'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '短信配置') {
|
||||||
|
this.condition = 'duanxin'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '任务系统配置') {
|
||||||
|
this.condition = 'renwu'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '文件上传配置') {
|
||||||
|
this.condition = 'oss'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '服务费配置') {
|
||||||
|
this.condition = 'fuwufei'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '协议配置') {
|
||||||
|
this.condition = 'xieyi'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '图片配置') {
|
||||||
|
this.condition = 'image'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '开关配置') {
|
||||||
|
this.condition = 'kaiguan'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
if (tab._props.label == '客服配置') {
|
||||||
|
this.condition = 'kefu'
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 修改弹框
|
||||||
|
amend(index, rows) {
|
||||||
|
this.dialogFormVisible = true;
|
||||||
|
this.form.id = rows.id;
|
||||||
|
this.form.type = rows.type
|
||||||
|
this.form.min = rows.min;
|
||||||
|
this.form.value = rows.value;
|
||||||
|
this.form.max = rows.max;
|
||||||
|
this.form.createAt = rows.createAt;
|
||||||
|
this.form.isAppUse = rows.isAppUse;
|
||||||
|
this.form.conditionFrom = rows.conditionFrom
|
||||||
|
},
|
||||||
|
updateAmendNotice(e, row) {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('common/update'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
...row,
|
||||||
|
isAppUse: e
|
||||||
|
})
|
||||||
|
}).then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataSelect()
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 修改
|
||||||
|
|
||||||
|
amendNoticeTo() {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('common/update'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'id': this.form.id,
|
||||||
|
'type': this.form.type,
|
||||||
|
'value': this.form.value,
|
||||||
|
'min': this.form.min,
|
||||||
|
'max': this.form.max,
|
||||||
|
'createAt': this.form.createAt,
|
||||||
|
'conditionFrom': this.form.conditionFrom,
|
||||||
|
isAppUse: this.form.isAppUse
|
||||||
|
})
|
||||||
|
}).then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dataSelect()
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 修改首页
|
||||||
|
amendWhether(index, rows) {
|
||||||
|
this.dialogFormVisible1 = true;
|
||||||
|
this.form2.id = rows.id;
|
||||||
|
this.form2.type = rows.type
|
||||||
|
this.form2.min = rows.min;
|
||||||
|
this.form2.value = rows.value;
|
||||||
|
this.form2.max = rows.max;
|
||||||
|
this.form2.createAt = rows.createAt;
|
||||||
|
this.form2.conditionFrom = rows.conditionFrom
|
||||||
|
},
|
||||||
|
WhetherNoticeTo() {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('common/update'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData({
|
||||||
|
'id': this.form2.id,
|
||||||
|
'type': this.form2.type,
|
||||||
|
'value': this.form2.value,
|
||||||
|
'min': this.form2.min,
|
||||||
|
'max': this.form2.max,
|
||||||
|
'createAt': this.form2.createAt,
|
||||||
|
'conditionFrom': this.form2.conditionFrom
|
||||||
|
})
|
||||||
|
}).then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.dataSelect()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
dataSelect() {
|
||||||
|
this.tableDataLoading = true
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`common/type/condition/${this.condition}`),
|
||||||
|
method: 'get',
|
||||||
|
params: this.$http.adornParams({})
|
||||||
|
}).then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.tableDataLoading = false
|
||||||
|
let returnData = data.data;
|
||||||
|
this.tableData = returnData
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAvatarSuccess1(file, fileList) {
|
||||||
|
this.form.value = file.data
|
||||||
|
console.log('file.data', file.data)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.dataSelect()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped="scoped">
|
<style scoped="scoped">
|
||||||
.eit {
|
.eit {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue