|
@@ -393,7 +393,7 @@ export default {
|
|
|
if(this.type == 'add'){
|
|
if(this.type == 'add'){
|
|
|
this.form.issuingAuthority = this.userInfo.groupId || '';
|
|
this.form.issuingAuthority = this.userInfo.groupId || '';
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- if(this.form.issuingAuthority){
|
|
|
|
|
|
|
+ if(this.form.issuingAuthority && this.menu == 'template'){
|
|
|
this.form.draftPersonId = this.userInfo.userId || '';
|
|
this.form.draftPersonId = this.userInfo.userId || '';
|
|
|
this.handleIssuingAuthorityChange(this.form.issuingAuthority);
|
|
this.handleIssuingAuthorityChange(this.form.issuingAuthority);
|
|
|
}
|
|
}
|
|
@@ -500,17 +500,19 @@ export default {
|
|
|
const { fieldKey, defaultValue } = field;
|
|
const { fieldKey, defaultValue } = field;
|
|
|
|
|
|
|
|
// 根据字段类型处理数据
|
|
// 根据字段类型处理数据
|
|
|
- if (field.fieldType === 'cascader') {
|
|
|
|
|
-
|
|
|
|
|
- // 级联选择器处理,恢复成数组
|
|
|
|
|
|
|
+ if (field.fieldType === 'multipleCascader') {
|
|
|
|
|
+ // 多选级联选择器处理,恢复成数组
|
|
|
if (typeof defaultValue === 'string' && defaultValue) {
|
|
if (typeof defaultValue === 'string' && defaultValue) {
|
|
|
- console.log('级联选择器值:~~', fieldKey, typeof defaultValue);
|
|
|
|
|
|
|
+ console.log('多选级联选择器值:~~', fieldKey, typeof defaultValue, defaultValue);
|
|
|
this.form[fieldKey] = defaultValue.split(',');
|
|
this.form[fieldKey] = defaultValue.split(',');
|
|
|
} else if (Array.isArray(defaultValue)) {
|
|
} else if (Array.isArray(defaultValue)) {
|
|
|
this.form[fieldKey] = defaultValue;
|
|
this.form[fieldKey] = defaultValue;
|
|
|
} else {
|
|
} else {
|
|
|
this.form[fieldKey] = [];
|
|
this.form[fieldKey] = [];
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if (field.fieldType === 'cascader') {
|
|
|
|
|
+ // 单选级联选择器处理,保持原值
|
|
|
|
|
+ this.form[fieldKey] = defaultValue || '';
|
|
|
} else if (field.fieldType === 'file') {
|
|
} else if (field.fieldType === 'file') {
|
|
|
// 文件处理,恢复成数组
|
|
// 文件处理,恢复成数组
|
|
|
if (typeof defaultValue === 'string' && defaultValue) {
|
|
if (typeof defaultValue === 'string' && defaultValue) {
|
|
@@ -598,7 +600,7 @@ export default {
|
|
|
{
|
|
{
|
|
|
fieldKey: 'jointIssuingAuthority',
|
|
fieldKey: 'jointIssuingAuthority',
|
|
|
fieldName: '联合部门',
|
|
fieldName: '联合部门',
|
|
|
- fieldType: 'cascader',
|
|
|
|
|
|
|
+ fieldType: 'multipleCascader',
|
|
|
isRequired: 0,
|
|
isRequired: 0,
|
|
|
placeholder: '请选择联合发文部门',
|
|
placeholder: '请选择联合发文部门',
|
|
|
defaultValue: [],
|
|
defaultValue: [],
|
|
@@ -616,7 +618,7 @@ export default {
|
|
|
{
|
|
{
|
|
|
fieldKey: 'mainRecipient',
|
|
fieldKey: 'mainRecipient',
|
|
|
fieldName: '主送',
|
|
fieldName: '主送',
|
|
|
- fieldType: 'cascader',
|
|
|
|
|
|
|
+ fieldType: 'multipleCascader',
|
|
|
isRequired: 0,
|
|
isRequired: 0,
|
|
|
placeholder: '请选择部门',
|
|
placeholder: '请选择部门',
|
|
|
defaultValue: '',
|
|
defaultValue: '',
|
|
@@ -625,7 +627,7 @@ export default {
|
|
|
{
|
|
{
|
|
|
fieldKey: 'ccRecipient',
|
|
fieldKey: 'ccRecipient',
|
|
|
fieldName: '抄送',
|
|
fieldName: '抄送',
|
|
|
- fieldType: 'cascader',
|
|
|
|
|
|
|
+ fieldType: 'multipleCascader',
|
|
|
isRequired: 0,
|
|
isRequired: 0,
|
|
|
placeholder: '请选择部门',
|
|
placeholder: '请选择部门',
|
|
|
defaultValue: '',
|
|
defaultValue: '',
|