优化全局系统设置
This commit is contained in:
parent
21f049f65c
commit
15354833e2
|
|
@ -9,11 +9,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
</el-table-column>
|
||||
<el-table-column label="是否返回给App">
|
||||
<el-table-column label="是否返回给App" prop="isAppUse" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.isAppUse"
|
||||
@change="updateAmendNotice($event,scope.row)"
|
||||
:active-value="1" :inactive-value="0"></el-switch>
|
||||
<!-- <el-switch v-model="scope.row.isAppUse" @change="updateAmendNotice($event, scope.row)"
|
||||
:active-value="1" :inactive-value="0"></el-switch> -->
|
||||
{{ scope.row.isAppUse == 1 ? '是' : '否' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
|
|
@ -35,7 +35,9 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
|
|
@ -114,8 +116,8 @@
|
|||
<el-table-column prop="value" label="内容" width="500">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;overflow: hidden;">
|
||||
{{scope.row.value}}</div>
|
||||
style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 4;line-clamp: 4;overflow: hidden;">
|
||||
{{ scope.row.value }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
|
|
@ -168,48 +170,52 @@
|
|||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文件上传配置" name="wenjian">
|
||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="min" label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||
@click="amend(scope.$index, scope.row)">编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="min" label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||
@click="amend(scope.$index, scope.row)">编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="协议配置" name="xieyi">
|
||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="min" label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||
@click="amend(scope.$index, scope.row)">编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||
<el-table-column fixed prop="type" label="编号" align="center" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="min" label="类型">
|
||||
</el-table-column>
|
||||
<el-table-column prop="value" label="内容" width="500">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createAt" label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" :disabled="!isAuth('allocationList:update')"
|
||||
@click="amend(scope.$index, scope.row)">编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="开关配置" name="kaiguan">
|
||||
<el-table v-loading="tableDataLoading" :data="tableData">
|
||||
|
|
@ -239,8 +245,8 @@
|
|||
<el-table-column prop="value" label="内容">
|
||||
<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}}
|
||||
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>
|
||||
</el-table-column>
|
||||
|
|
@ -263,19 +269,22 @@
|
|||
<el-input v-model="form.min" style="width:65%;" readonly></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容:" :label-width="formLabelWidth">
|
||||
<quill-editor v-if="form.conditionFrom=='xieyi'" ref="myTextEditor" v-model="form.value" :options="quillOption"
|
||||
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
|
||||
<quill-editor v-if="form.conditionFrom == 'xieyi'" ref="myTextEditor" v-model="form.value"
|
||||
:options="quillOption"
|
||||
style="padding-bottom: 50px;height: 300px;width: 72%;display: inline-table;margin-bottom: 60px;">
|
||||
</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-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">
|
||||
<img v-if="form.value" :src="form.value" class="avatar" style="width: 148px;height: 148px;" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon" style="font-size: 28px;color: #8c939d"></i>
|
||||
<img v-if="form.value" :src="form.value" class="avatar"
|
||||
style="width: 148px;height: 148px;" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"
|
||||
style="font-size: 28px;color: #8c939d"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-else-if="form.conditionFrom=='kaiguan'">
|
||||
<div v-else-if="form.conditionFrom == 'kaiguan'">
|
||||
<div>
|
||||
<el-radio-group v-model="form.value">
|
||||
<el-radio label="是">是</el-radio>
|
||||
|
|
@ -283,12 +292,16 @@
|
|||
</el-radio-group>
|
||||
</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-form-item>
|
||||
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -300,264 +313,264 @@
|
|||
</template>
|
||||
|
||||
<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
|
||||
} 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
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
quillOption: quillConfig,
|
||||
openValue: '是',
|
||||
closeValue: '否',
|
||||
limit: 10,
|
||||
page: 0,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
quillOption: quillConfig,
|
||||
openValue: '是',
|
||||
closeValue: '否',
|
||||
limit: 10,
|
||||
page: 0,
|
||||
min: '',
|
||||
value: '',
|
||||
id: '',
|
||||
condition: 'xitong',
|
||||
activeName: 'first',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
tableDataLoading: true,
|
||||
formLabelWidth: '200px',
|
||||
form: {
|
||||
id: '',
|
||||
min: '',
|
||||
value: '',
|
||||
type: '',
|
||||
isAppUse: false,
|
||||
},
|
||||
form2: {
|
||||
id: '',
|
||||
condition: 'xitong',
|
||||
activeName: 'first',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
tableDataLoading: true,
|
||||
formLabelWidth: '200px',
|
||||
form: {
|
||||
id: '',
|
||||
min: '',
|
||||
value: '',
|
||||
type: '',
|
||||
isAppUse: false,
|
||||
},
|
||||
form2: {
|
||||
id: '',
|
||||
min: '',
|
||||
value: '',
|
||||
type: '',
|
||||
},
|
||||
values: [{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
checkBoxData: [] //多选框选择的值
|
||||
min: '',
|
||||
value: '',
|
||||
type: '',
|
||||
},
|
||||
values: [{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
},
|
||||
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()
|
||||
],
|
||||
tableData: [],
|
||||
checkBoxData: [] //多选框选择的值
|
||||
}
|
||||
},
|
||||
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>
|
||||
|
||||
<style scoped="scoped">
|
||||
.eit {
|
||||
height: 120px;
|
||||
}
|
||||
.eit {
|
||||
height: 120px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue