|
@@ -63,6 +63,16 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="建立群聊:" prop="is_group" class="custom-align-right">
|
|
|
|
+ <el-radio-group v-model="form.is_group" :disabled="this.$route.query.id!=undefined">
|
|
|
|
+ <el-radio :label="1">是</el-radio>
|
|
|
|
+ <el-radio :label="0">否</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="群聊名称:" prop="group_name" class="custom-align-right" v-if="form.is_group == 1" :disabled="this.$route.query.id!=undefined">
|
|
|
|
+ <el-input v-model="form.group_name" autocomplete="off" placeholder="请输入群聊名称"></el-input>
|
|
|
|
+ </el-form-item>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -152,6 +162,8 @@ export default {
|
|
file: "",//文件路径
|
|
file: "",//文件路径
|
|
department_arr_id: [],//部门id
|
|
department_arr_id: [],//部门id
|
|
department_id: '',//部门id
|
|
department_id: '',//部门id
|
|
|
|
+ is_group: 0,//是否创建群聊:1:是,0:否
|
|
|
|
+ group_name: '',//群聊名称
|
|
},
|
|
},
|
|
//1.2 表单验证规则
|
|
//1.2 表单验证规则
|
|
formRules: {
|
|
formRules: {
|
|
@@ -162,6 +174,7 @@ export default {
|
|
level: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
level: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
content: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
content: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
address: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
address: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
|
+ is_group: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
},
|
|
},
|
|
//1.3富文本编辑器配置
|
|
//1.3富文本编辑器配置
|
|
showHtml: false, //用于保存源码内容
|
|
showHtml: false, //用于保存源码内容
|
|
@@ -328,8 +341,8 @@ export default {
|
|
const isJPG = file.type === 'image/jpeg';
|
|
const isJPG = file.type === 'image/jpeg';
|
|
const isPNG = file.type === 'image/png';
|
|
const isPNG = file.type === 'image/png';
|
|
//word pdf
|
|
//word pdf
|
|
- const isWord = file.type === 'application/msword' || file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
|
|
- const isPdf = file.type === 'application/pdf';
|
|
|
|
|
|
+ const isWord = file.type === 'application/msword' || file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' || file.type === 'application/vnd.ms-word' || file.type === 'doc';
|
|
|
|
+ const isPdf = file.type === 'application/pdf' || file.type === 'application/x-pdf' || file.type === 'application/acrobat' || file.type === 'pdf' || file.type === 'text/x-pdf' || file.type === 'application/x-download' || file.type === 'application/octet-stream';
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
console.log(this.imgurl.length, '-0--------------------------------')
|
|
console.log(this.imgurl.length, '-0--------------------------------')
|
|
if (this.imgurl.length > 4) {
|
|
if (this.imgurl.length > 4) {
|
|
@@ -388,7 +401,7 @@ export default {
|
|
}
|
|
}
|
|
console.log(typeof this.form.time, '---=-==-=')
|
|
console.log(typeof this.form.time, '---=-==-=')
|
|
console.log(this.form.time.length, '---=-==-=')
|
|
console.log(this.form.time.length, '---=-==-=')
|
|
- if (this.form.time.length > 0) {
|
|
|
|
|
|
+ if (typeof this.form.time=='object' && this.form.time.length > 0) {
|
|
this.form.start = this.formatDate(this.form.time[0]);
|
|
this.form.start = this.formatDate(this.form.time[0]);
|
|
this.form.end = this.formatDate(this.form.time[1]);
|
|
this.form.end = this.formatDate(this.form.time[1]);
|
|
delete this.form.time;
|
|
delete this.form.time;
|
|
@@ -473,6 +486,8 @@ export default {
|
|
const filePath = res.data.file;
|
|
const filePath = res.data.file;
|
|
const fileExtension = filePath.split('.').pop().toLowerCase();
|
|
const fileExtension = filePath.split('.').pop().toLowerCase();
|
|
this.fileType = fileExtension; // 设置文件类型
|
|
this.fileType = fileExtension; // 设置文件类型
|
|
|
|
+ this.form.is_group = parseInt(res.data.is_group );
|
|
|
|
+ this.form.group_name = res.data.group_name;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
async loadCascaderPath(path) {
|
|
async loadCascaderPath(path) {
|
|
@@ -534,8 +549,7 @@ export default {
|
|
this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
|
|
this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
|
|
}
|
|
}
|
|
console.log(typeof this.form.time, '---=-==-=')
|
|
console.log(typeof this.form.time, '---=-==-=')
|
|
- console.log(this.form.time.length, '---=-==-=')
|
|
|
|
- if (this.form.time.length > 0) {
|
|
|
|
|
|
+ if (typeof this.form.time=='object' && this.form.time.length > 0) {
|
|
this.form.start = this.formatDate(this.form.time[0]);
|
|
this.form.start = this.formatDate(this.form.time[0]);
|
|
this.form.end = this.formatDate(this.form.time[1]);
|
|
this.form.end = this.formatDate(this.form.time[1]);
|
|
delete this.form.time;
|
|
delete this.form.time;
|