no message
This commit is contained in:
parent
e0e2318e2f
commit
921be40c64
@ -60,7 +60,7 @@
|
||||
<Loading v-if="loadIng > 0"/>
|
||||
</li>
|
||||
</ul>
|
||||
<Button class="manage-box-new" type="primary" icon="md-add" @click="addShow=true">{{$L('新建项目')}}</Button>
|
||||
<Button class="manage-box-new" type="primary" icon="md-add" @click="onAddShow">{{$L('新建项目')}}</Button>
|
||||
</div>
|
||||
|
||||
<div class="manage-box-main">
|
||||
@ -76,7 +76,7 @@
|
||||
:mask-closable="false">
|
||||
<Form ref="addProject" :model="addData" :rules="addRule" label-width="auto" @submit.native.prevent>
|
||||
<FormItem prop="name" :label="$L('项目名称')">
|
||||
<Input type="text" v-model="addData.name"></Input>
|
||||
<Input ref="projectName" type="text" v-model="addData.name"></Input>
|
||||
</FormItem>
|
||||
<FormItem prop="columns" :label="$L('项目模板')">
|
||||
<Select v-model="addData.template" @on-change="(res) => {$set(addData, 'columns', columns[res].value)}" :placeholder="$L('请选择模板')">
|
||||
@ -280,6 +280,13 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
onAddShow() {
|
||||
this.addShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.projectName.focus();
|
||||
})
|
||||
},
|
||||
|
||||
onAddProject() {
|
||||
this.$refs.addProject.validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -34,25 +34,24 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getMsg();
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['projectDetail', 'projectChatShow']),
|
||||
},
|
||||
|
||||
watch: {
|
||||
projectDetail() {
|
||||
this.getMsg()
|
||||
'projectDetail.dialog_id' () {
|
||||
this.getMsgList()
|
||||
},
|
||||
projectChatShow() {
|
||||
this.getMsg()
|
||||
projectChatShow: {
|
||||
handler() {
|
||||
this.getMsgList()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getMsg() {
|
||||
getMsgList() {
|
||||
if (this.projectChatShow && this.projectDetail.dialog_id) {
|
||||
this.$store.dispatch("getDialogMsgList", this.projectDetail.dialog_id);
|
||||
}
|
||||
|
@ -298,7 +298,7 @@
|
||||
:mask-closable="false">
|
||||
<Form ref="addProject" :model="settingData" label-width="auto" @submit.native.prevent>
|
||||
<FormItem prop="name" :label="$L('项目名称')">
|
||||
<Input type="text" v-model="settingData.name" :maxlength="32" :placeholder="$L('必填')"></Input>
|
||||
<Input ref="projectName" type="text" v-model="settingData.name" :maxlength="32" :placeholder="$L('必填')"></Input>
|
||||
</FormItem>
|
||||
<FormItem prop="desc" :label="$L('项目介绍')">
|
||||
<Input type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" v-model="settingData.desc" :maxlength="255" :placeholder="$L('选填')"></Input>
|
||||
@ -973,6 +973,9 @@ export default {
|
||||
this.$set(this.settingData, 'name', this.projectDetail.name);
|
||||
this.$set(this.settingData, 'desc', this.projectDetail.desc);
|
||||
this.settingShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.projectName.focus();
|
||||
});
|
||||
break;
|
||||
|
||||
case "user":
|
||||
|
Loading…
x
Reference in New Issue
Block a user