| | |
| | | <el-input v-model="propform.title" placeholder="请输入名称标题" /> |
| | | </el-form-item> |
| | | <el-form-item label="快捷标签" prop="kjbq"> |
| | | <span slot="label" style="display:inline-block;border-bottom: 2px solid blue;" @click="handleQuery"> |
| | | 快捷标签 |
| | | </span> |
| | | <el-checkbox-group |
| | | v-model="propform.kjbq" |
| | | @change="handleCheckedCitiesChange" |
| | |
| | | <el-button type="primary" @click="handleOk">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="添加快捷标签" :visible.sync="kjbqopen" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" label-width="80px"> |
| | | <el-form-item label="名称" prop="kjbq"> |
| | | <el-input v-model="form.kjbq" placeholder="请输入名称" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getTjAdviceKjbqByFl, |
| | | addCyTjAdvice, |
| | | addCyTjAdvice,addTjAdviceKjbq |
| | | } from "@/api/system/biaoqianzidian"; |
| | | import { getInfo } from "@/api/login"; |
| | | export default { |
| | |
| | | advice: "", |
| | | kjbq: [], |
| | | }, |
| | | form:{ |
| | | |
| | | }, |
| | | kjbqopen: false, |
| | | open: false, |
| | | openone: false, |
| | | // 弹出层标题 |
| | |
| | | getList() { |
| | | this.loading = true; |
| | | getInfo().then((res) => { |
| | | this.form.userId = res.user.userId; |
| | | this.queryParams.userId = res.user.userId; |
| | | getTjAdviceKjbqByFl(this.queryParams).then((res) => { |
| | | if (res.data) { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | handleCheckedCitiesChange(val) { |
| | | val.forEach((item) => { |
| | | this.checkbox += item; |
| | | handleQuery(){ |
| | | this.kjbqopen = true; |
| | | }, |
| | | cancel(){ |
| | | this.kjbqopen = false; |
| | | }, |
| | | submitForm() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateTjAdviceKjbq(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.kjbqopen = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addTjAdviceKjbq(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.kjbqopen = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | handleCheckedCitiesChange(val) { |
| | | |
| | | }, |
| | | handleOk() { |
| | | let data = { |
| | | title: this.propform.title, |