|
@@ -3,6 +3,7 @@
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
<el-form-item label="标题" prop="conferenceTitle">
|
|
|
<el-input
|
|
|
+ :disabled="param.edit"
|
|
|
v-model="form.conferenceTitle"
|
|
|
placeholder="请输入会议标题"
|
|
|
></el-input>
|
|
@@ -10,6 +11,7 @@
|
|
|
|
|
|
<el-form-item label="内容" prop="conferenceContent">
|
|
|
<el-input
|
|
|
+ :disabled="param.edit"
|
|
|
type="textarea"
|
|
|
rows="4"
|
|
|
placeholder="请输入会议内容"
|
|
@@ -17,33 +19,33 @@
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
<p style="display: none" v-html="form.conferenceContent" ref="test"></p>
|
|
|
- <el-form-item label="协作单位">
|
|
|
- <!-- <el-select
|
|
|
- v-model="deptId"
|
|
|
- multiple
|
|
|
+ <el-form-item label="协作单位" prop="cooperativeUnitId">
|
|
|
+ <el-select
|
|
|
+ v-model="seleValue"
|
|
|
placeholder="请选择协作单位"
|
|
|
- @change="selectChange"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ @change="handleChange"
|
|
|
+ >
|
|
|
+ <!-- style="width: 100%" -->
|
|
|
<el-option
|
|
|
v-for="item in deptList"
|
|
|
:key="item.deptId"
|
|
|
:label="item.deptName"
|
|
|
- :value="item.deptId"
|
|
|
+ :value="item.deptId+''"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select> -->
|
|
|
- <el-cascader
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-cascader
|
|
|
clearable
|
|
|
v-model="seleValue"
|
|
|
- :options="deptListSele"
|
|
|
+ :options="deptList"
|
|
|
:props="propOpt"
|
|
|
@change="handleChange"
|
|
|
>
|
|
|
- </el-cascader>
|
|
|
+ </el-cascader> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="协作要求" prop="collaborativeContent">
|
|
|
<el-input
|
|
|
+ :disabled="param.edit"
|
|
|
type="textarea"
|
|
|
rows="4"
|
|
|
placeholder="请输入协作要求"
|
|
@@ -52,13 +54,20 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="状态" prop="type">
|
|
|
<template>
|
|
|
- <el-radio v-model="form.type" label="1">完结</el-radio>
|
|
|
- <el-radio v-model="form.type" label="2">长期</el-radio>
|
|
|
- <el-radio v-model="form.type" label="3">限期</el-radio>
|
|
|
+ <el-radio :disabled="param.edit" v-model="form.type" label="1"
|
|
|
+ >完结</el-radio
|
|
|
+ >
|
|
|
+ <el-radio :disabled="param.edit" v-model="form.type" label="2"
|
|
|
+ >长期</el-radio
|
|
|
+ >
|
|
|
+ <el-radio :disabled="param.edit" v-model="form.type" label="3"
|
|
|
+ >限期</el-radio
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="padding-bottom: 20px" label="限期日期" prop="date">
|
|
|
<el-date-picker
|
|
|
+ :disabled="param.edit"
|
|
|
v-model="form.date"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -77,6 +86,7 @@
|
|
|
<script>
|
|
|
import { getDept } from "@/api/portal/CONFERENCEREPLY/CONFERENCEREPLY.js";
|
|
|
import { listDept } from "@/api/system/dept";
|
|
|
+import { getUserInfo } from "@/api/portal/ARTICLE/ARTICLE";
|
|
|
|
|
|
import {
|
|
|
addJOINTCONFERENCE,
|
|
@@ -98,7 +108,7 @@ export default {
|
|
|
data() {
|
|
|
var checkDeptId = (rule, value, callback) => {
|
|
|
if (this.seleValue.length == 0) {
|
|
|
- return callback(new Error("协作单位不能为空"));
|
|
|
+ return callback(new Error("协作单位不能为空!!!"));
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
@@ -109,19 +119,19 @@ export default {
|
|
|
// 限期日期
|
|
|
date: null,
|
|
|
|
|
|
- propOpt: {
|
|
|
- value: "value",
|
|
|
- label: "label",
|
|
|
- children: "children",
|
|
|
- multiple: true,
|
|
|
- checkStrictly: true,
|
|
|
- emitPath: false,
|
|
|
- },
|
|
|
+ // propOpt: {
|
|
|
+ // value: "value",
|
|
|
+ // label: "label",
|
|
|
+ // children: "children",
|
|
|
+ // multiple: false,
|
|
|
+ // checkStrictly: true,
|
|
|
+ // emitPath: false,
|
|
|
+ // },
|
|
|
|
|
|
deptId: [],
|
|
|
deptList: [],
|
|
|
form: {
|
|
|
- conferenceContent:'',
|
|
|
+ conferenceContent: "",
|
|
|
},
|
|
|
rules: {
|
|
|
conferenceTitle: [
|
|
@@ -130,6 +140,9 @@ export default {
|
|
|
conferenceContent: [
|
|
|
{ required: true, message: "内容不能为空", trigger: "blur" },
|
|
|
],
|
|
|
+ cooperativeUnitId: [
|
|
|
+ { required: true, message: "协作单位不能为空", trigger: "blur" },
|
|
|
+ ],
|
|
|
|
|
|
type: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
|
|
collaborativeContent: [
|
|
@@ -150,10 +163,9 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.seleValue = this.form.deptIds;
|
|
|
let arr = eval("(" + this.form.deptIds + ")");
|
|
|
- this.seleValue = arr;
|
|
|
+ this.seleValue = arr.toString();
|
|
|
+ console.log(this.seleValue);
|
|
|
this.deptId = JSON.parse(this.form.deptIds);
|
|
|
- // this.form.conferenceContent = response.data.conferenceContent || '123';
|
|
|
- // console.log(response.data);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -168,15 +180,22 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- getDept(2).then((res) => {
|
|
|
- this.deptList = res.data;
|
|
|
- });
|
|
|
+ // if (this.user.type == 1) {
|
|
|
+ getDept(2).then((res) => {
|
|
|
+ this.deptList = res.data;
|
|
|
+ });
|
|
|
+ // }else{
|
|
|
+ // getDept(1).then((res) => {
|
|
|
+ // this.deptList = res.data;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
updated() {
|
|
|
- this.form.conferenceContent = this.$refs["test"].innerText ;
|
|
|
+ this.form.conferenceContent = this.$refs["test"].innerText;
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ getDeptList() {},
|
|
|
handleTrees(data, id, parentId, children) {
|
|
|
let config = {
|
|
|
id: id || "id",
|
|
@@ -226,10 +245,11 @@ export default {
|
|
|
// console.log(val);
|
|
|
},
|
|
|
handleChange(val) {
|
|
|
- console.log(val);
|
|
|
+ this.form.cooperativeUnitId = this.seleValue;
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
+ console.log(this.form);
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (this.seleValue.length == 0) {
|
|
|
this.$message.error("请选择协作单位");
|
|
@@ -237,7 +257,7 @@ export default {
|
|
|
}
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- this.form.cooperativeUnitId = this.seleValue;
|
|
|
+ this.form.cooperativeUnitId = [this.seleValue];
|
|
|
this.form.deptNum = this.form.cooperativeUnitId.length;
|
|
|
updateJOINTCONFERENCE(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
@@ -261,7 +281,7 @@ export default {
|
|
|
//↑好家伙你还改错了,是seleValue不是deptId
|
|
|
//↑啥玩意?
|
|
|
|
|
|
- this.form.cooperativeUnitId = this.seleValue;
|
|
|
+ this.form.cooperativeUnitId = [+this.seleValue];
|
|
|
this.form.deptNum = this.form.cooperativeUnitId.length;
|
|
|
addJOINTCONFERENCE(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("发布成功");
|