Commit 151feae3 authored by zhanglongtao's avatar zhanglongtao

消息配置修改

parent 1987a8f4
...@@ -1191,7 +1191,10 @@ export default { ...@@ -1191,7 +1191,10 @@ export default {
status: '启用状态', status: '启用状态',
code: '编码', code: '编码',
template: '模板', template: '模板',
title:'标题',
departmentIds: '部门Id', departmentIds: '部门Id',
departments: '部门', departments: '部门',
color:'颜色',
icon:'图标',
} }
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('departments')" prop="departmentIds"> <FormItem :label="l('departments')" prop="departmentIds">
<DepartmentSelect v-model="entity.departmentIds"/> <DepartmentSelect v-model="entity.departmentIds" />
</FormItem> </FormItem>
</Col> </Col>
...@@ -45,6 +45,23 @@ ...@@ -45,6 +45,23 @@
<Dictionary code="message.config.isInner" v-model="entity.isEmail" type="radio"></Dictionary> <Dictionary code="message.config.isInner" v-model="entity.isEmail" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('color')" prop="color">
<Input v-model="entity.color">
<ColorPicker v-model="entity.color" slot="prepend" transfer size="small" recommend />
</Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('icon')" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('template')" prop="template"> <FormItem :label="l('template')" prop="template">
<Input v-model="entity.template" type="textarea" :rows="5"></Input> <Input v-model="entity.template" type="textarea" :rows="5"></Input>
...@@ -66,8 +83,7 @@ export default { ...@@ -66,8 +83,7 @@ export default {
if (!value) { if (!value) {
return callback(new Error("编号不能为空")); return callback(new Error("编号不能为空"));
} }
Api.list(value).then(r => { Api.list(value).then((r) => {
console.log(r.result)
if (r.result.length > 0) { if (r.result.length > 0) {
return callback(new Error("编号已经存在")); return callback(new Error("编号已经存在"));
} else { } else {
...@@ -94,12 +110,19 @@ export default { ...@@ -94,12 +110,19 @@ export default {
isEmail: 0, isEmail: 0,
roles: "", roles: "",
users: "", users: "",
departments:"", departments: "",
status: 1, status: 1,
template: "",
title: "",
color: "",
// icon: "",
}, },
rules: { rules: {
categoryName: [{ required: true, message: "必填", trigger: "blur" }], categoryName: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }, { validator: validateCode, trigger: "blur" }], code: [
{ required: true, message: "必填", trigger: "blur" },
{ validator: validateCode, trigger: "blur" },
],
}, },
}; };
}, },
...@@ -114,9 +137,9 @@ export default { ...@@ -114,9 +137,9 @@ export default {
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.entity.userIds = this.entity.userIds.toString(); this.entity.userIds = this.entity.userIds.toString();
this.entity.roleIds = this.entity.roleIds.toString(); this.entity.roleIds = this.entity.roleIds.toString();
this.entity.departmentIds = this.entity.departmentIds.toString(); this.entity.departmentIds = this.entity.departmentIds.toString();
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
...@@ -164,4 +187,4 @@ export default { ...@@ -164,4 +187,4 @@ export default {
}, },
}, },
}; };
</script> </script>
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('departments')" prop="departmentIds"> <FormItem :label="l('departments')" prop="departmentIds">
<DepartmentSelect v-model="entity.departmentIds"/> <DepartmentSelect v-model="entity.departmentIds" />
</FormItem> </FormItem>
</Col> </Col>
...@@ -45,6 +45,23 @@ ...@@ -45,6 +45,23 @@
<Dictionary code="message.config.isInner" v-model="entity.isEmail" type="radio"></Dictionary> <Dictionary code="message.config.isInner" v-model="entity.isEmail" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('color')" prop="color">
<Input v-model="entity.color">
<ColorPicker v-model="entity.color" slot="prepend" transfer size="small" recommend />
</Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('icon')" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('template')" prop="template"> <FormItem :label="l('template')" prop="template">
<Input v-model="entity.template" type="textarea" :rows="5"></Input> <Input v-model="entity.template" type="textarea" :rows="5"></Input>
...@@ -64,7 +81,9 @@ export default { ...@@ -64,7 +81,9 @@ export default {
data() { data() {
return { return {
disabled: false, disabled: false,
entity: {}, entity: {
color:""
},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
}, },
...@@ -84,10 +103,12 @@ export default { ...@@ -84,10 +103,12 @@ export default {
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
r.result.userIds = this.$u.toIntArray(r.result.userIds); r.result.userIds = this.$u.toIntArray(r.result.userIds);
r.result.roleIds = this.$u.toIntArray(r.result.roleIds); r.result.roleIds = this.$u.toIntArray(r.result.roleIds);
r.result.departmentIds = this.$u.toIntArray(r.result.departmentIds); r.result.departmentIds = this.$u.toIntArray(r.result.departmentIds);
if(r.result.color == null){
r.result.color = "";
}
this.entity = r.result; this.entity = r.result;
}); });
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input placeholder="请输入关键字分类名称" v-model="easySearch.keys.value" /> <Input placeholder="请输入关键字名称" v-model="easySearch.keys.value" />
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
...@@ -111,6 +111,13 @@ export default { ...@@ -111,6 +111,13 @@ export default {
easy: true, easy: true,
high: true, high: true,
}, },
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
},
{ {
key: "template", key: "template",
title: this.l("template"), title: this.l("template"),
...@@ -118,6 +125,7 @@ export default { ...@@ -118,6 +125,7 @@ export default {
easy: true, easy: true,
high: true, high: true,
}, },
// { // {
// key: "roles", // key: "roles",
// title: this.l("roles"), // title: this.l("roles"),
......
...@@ -6,18 +6,22 @@ ...@@ -6,18 +6,22 @@
<Input v-model="condition.id.value"></Input> <Input v-model="condition.id.value"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" :v-if="condition.code.show"> <Col :span="12" :v-if="condition.code.show">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="condition.code.value"></Input> <Input v-model="condition.code.value"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" :v-if="condition.categoryName.show"> <Col :span="12" :v-if="condition.categoryName.show">
<FormItem :label="l('categoryName')" prop="categoryName"> <FormItem :label="l('categoryName')" prop="categoryName">
<Input v-model="condition.categoryName.value"></Input> <Input v-model="condition.categoryName.value"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" :v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="message.config.status" v-model="condition.status.value" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.isInner.show"> <Col :span="12" :v-if="condition.isInner.show">
<FormItem :label="l('isInner')" prop="isInner"> <FormItem :label="l('isInner')" prop="isInner">
<Dictionary code="message.config.isInner" v-model="condition.isInner.value" type="radio"></Dictionary> <Dictionary code="message.config.isInner" v-model="condition.isInner.value" type="radio"></Dictionary>
...@@ -28,14 +32,6 @@ ...@@ -28,14 +32,6 @@
<Dictionary code="message.config.isInner" v-model="condition.isEmail.value" type="radio"></Dictionary> <Dictionary code="message.config.isInner" v-model="condition.isEmail.value" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" :v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="message.config.status" v-model="condition.status.value" type="radio"></Dictionary>
</FormItem>
</Col>
</Row> </Row>
</Form> </Form>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment