|
|
@@ -1,12 +1,58 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button type="primary" size="small">{{$t(`设置`)}}</el-button>
|
|
|
+ <el-button size="small" style="width:120px" type="primary" @click="querySite_Parameter">{{ $t('设 置') }}</el-button>
|
|
|
+ <el-dialog :title="$t(dialog_title)" append-to-body :visible.sync="dialogEditVisible" width="860px">
|
|
|
+ <el-row :gutter="16" style="text-align: center">
|
|
|
+ <el-col :span="24" style="margin-top: -20px">
|
|
|
+ <span style="color: #8C8C8C">{{ $t(tip_content) }}?</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="margin-top: 20px">
|
|
|
+ <div style="width: 780px;" class="inline-16" >
|
|
|
+ <el-radio-group v-model="checkData">
|
|
|
+ <el-radio :label="1" style="color: #8C8C8C">{{ $t('开启') }}</el-radio>
|
|
|
+ <el-radio :label="0" style="color: #8C8C8C">{{$t('关闭')}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogEditVisible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
|
|
|
+ <el-button size="small" type="warning" class="normal-btn-width btn-warning" @click="onSubmit">{{$t('确 定')}}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: "setContentTemplate"
|
|
|
+ name: "setContentTemplate",
|
|
|
+ props:["data","dialog_title","tip_content","set_name"],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogEditVisible:false,
|
|
|
+ checkData:0,
|
|
|
+ form:{}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ querySite_Parameter(){
|
|
|
+ this.dialogEditVisible = true
|
|
|
+ this.form = Object.assign({},this.form,this.data)
|
|
|
+ this.checkData = this.form[this.set_name]
|
|
|
+ },
|
|
|
+ async onSubmit(){
|
|
|
+ this.form[this.set_name] = this.checkData
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.site.site",
|
|
|
+ "method": "updateSite_Parameter",
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ this.dialogEditVisible = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|