[update] 会员管理-会议维护,增加标准项目面板
This commit is contained in:
@@ -182,6 +182,94 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<!--会议信息end-->
|
<!--会议信息end-->
|
||||||
|
|
||||||
|
<!-- 标准项目,2024-2月变更,标协会议增加标准项目面板 -->
|
||||||
|
<section v-if="meetingType === '2'">
|
||||||
|
<div class="item-title">标准项目</div>
|
||||||
|
<!-- 标准项目的详细信息-->
|
||||||
|
<section>
|
||||||
|
<a-row :gutter="24" v-for="(standardProject, index) in model.standardProjectList" :key="index">
|
||||||
|
<!-- 存儲初始化的id-->
|
||||||
|
<a-col v-show="false">
|
||||||
|
<a-form-item :label="'标准号id ' + (index + 1) " :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input
|
||||||
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator="['standardProjectList['+index+'].id']"
|
||||||
|
placeholder="请输入标准号id"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="标准编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input
|
||||||
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator="['standardProjectList['+index+'].standardNumber', validatorRules.standProjectStandardNumber]"
|
||||||
|
placeholder="请输入标准编号"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="标准名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input
|
||||||
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator="['standardProjectList['+index+'].standardName',validatorRules.standProjectStandardName]"
|
||||||
|
placeholder="请输入标准名称"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="标准类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag
|
||||||
|
dict-code=""
|
||||||
|
v-decorator="['standardProjectList['+index+'].standardType',validatorRules.standProjectStandardType]"
|
||||||
|
placeholder="请输入标准类别"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="制修订" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag
|
||||||
|
dict-code=""
|
||||||
|
v-decorator="['standardProjectList['+index+'].edit', validatorRules.standProjectEdit]"
|
||||||
|
placeholder="请输入制修订"></j-dict-select-tag>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="宣贯人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-principal placeholder="请选择宣贯人"
|
||||||
|
v-decorator="['standardProjectList['+index+'].propagator', validatorRules.standProjectPropagator]">
|
||||||
|
</select-principal>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="宣贯时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-date-picker style="width: 100%"
|
||||||
|
placeholder="请选择宣贯时间"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
valueFormat="YYYY-MM-DD"
|
||||||
|
v-decorator="['standardProjectList['+index+'].promulgationTime', validatorRules.standProjectPromulgationTime]">
|
||||||
|
</a-date-picker>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="10" :sm="24">
|
||||||
|
<a-form-item label="宣贯地点" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input
|
||||||
|
@change="event => event.target.value = event.target.value.trim()"
|
||||||
|
:maxLength="50"
|
||||||
|
v-decorator="['standardProjectList['+index+'].promotionPlace',validatorRules.standProjectPromotionPlace]"
|
||||||
|
placeholder="请输入宣贯地点"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="8" :xl="4" :sm="24">
|
||||||
|
<a-form-item>
|
||||||
|
<a-button icon="plus" @click="addStandardProject"></a-button>
|
||||||
|
<a-button icon="minus" @click="removeStandardProject(index)" style="margin-left: 8px;"></a-button>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<!-- 标准项目end -->
|
||||||
|
|
||||||
<!-- 会议问题征集--只有标协会议存在 -->
|
<!-- 会议问题征集--只有标协会议存在 -->
|
||||||
<section v-if="meetingType === '2' && (tbMeetingType === 1 || tbMeetingType === 2)" >
|
<section v-if="meetingType === '2' && (tbMeetingType === 1 || tbMeetingType === 2)" >
|
||||||
<!-- 选择是否需要问题征集-->
|
<!-- 选择是否需要问题征集-->
|
||||||
@@ -769,6 +857,18 @@ export default {
|
|||||||
standardName: undefined
|
standardName: undefined
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
if((this.model.standardProjectList || []).length === 0) {
|
||||||
|
// 标准项目列表
|
||||||
|
this.model.standardProjectList = [{
|
||||||
|
standardNumber: undefined,
|
||||||
|
standardName: undefined,
|
||||||
|
standardType: undefined,
|
||||||
|
edit: undefined,
|
||||||
|
propagator: undefined,
|
||||||
|
promulgationTime: undefined,
|
||||||
|
promotionPlace: undefined
|
||||||
|
}]
|
||||||
|
}
|
||||||
this.model.isAddQuestion = this.model.isAddQuestion || 0 // 处理历史数据的问题
|
this.model.isAddQuestion = this.model.isAddQuestion || 0 // 处理历史数据的问题
|
||||||
// 是否WASIC--处理历史数据的问题
|
// 是否WASIC--处理历史数据的问题
|
||||||
this.model.isWasic = this.model.isWasic || 0
|
this.model.isWasic = this.model.isWasic || 0
|
||||||
@@ -790,6 +890,16 @@ export default {
|
|||||||
standardNumber: undefined,
|
standardNumber: undefined,
|
||||||
standardName: undefined
|
standardName: undefined
|
||||||
}]
|
}]
|
||||||
|
// 标准项目列表
|
||||||
|
this.model.standardProjectList = [{
|
||||||
|
standardNumber: undefined,
|
||||||
|
standardName: undefined,
|
||||||
|
standardType: undefined,
|
||||||
|
edit: undefined,
|
||||||
|
propagator: undefined,
|
||||||
|
promulgationTime: undefined,
|
||||||
|
promotionPlace: undefined
|
||||||
|
}]
|
||||||
// 新增取路由参数
|
// 新增取路由参数
|
||||||
this.meetingType = this.$route.query.meetingType
|
this.meetingType = this.$route.query.meetingType
|
||||||
// 新增根据路由参数 会议类型更换不同的接口
|
// 新增根据路由参数 会议类型更换不同的接口
|
||||||
@@ -843,7 +953,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.form.setFieldsValue(pick(this.model, 'signInTime', 'tbMeetingType', 'meetingCostsVip', 'isAddQuestion', ...otherKeys))
|
this.form.setFieldsValue(pick(this.model, 'signInTime', 'tbMeetingType', 'meetingCostsVip', 'isAddQuestion', 'standardProjectList', ...otherKeys))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 如果是工作组会议 赋值工作组
|
// 如果是工作组会议 赋值工作组
|
||||||
@@ -882,6 +992,10 @@ export default {
|
|||||||
if(!values.questionList) {
|
if(!values.questionList) {
|
||||||
values.questionList = null
|
values.questionList = null
|
||||||
}
|
}
|
||||||
|
// 判断标准项目
|
||||||
|
if (!values.standardProjectList) {
|
||||||
|
values.standardProjectList = null
|
||||||
|
}
|
||||||
// let placeName = values.convokeLocale
|
// let placeName = values.convokeLocale
|
||||||
//{venue: this.getPcaText(placeName)}
|
//{venue: this.getPcaText(placeName)}
|
||||||
const formData = Object.assign(this.model, values)
|
const formData = Object.assign(this.model, values)
|
||||||
@@ -1424,7 +1538,51 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// 24年2月变更
|
||||||
|
// 添加标准项目
|
||||||
|
addStandardProject(index) {
|
||||||
|
const {form} = this
|
||||||
|
const obj = {
|
||||||
|
standardNumber: undefined,
|
||||||
|
standardName: undefined,
|
||||||
|
standardType: undefined,
|
||||||
|
edit: undefined,
|
||||||
|
propagator: undefined,
|
||||||
|
promulgationTime: undefined,
|
||||||
|
promotionPlace: undefined
|
||||||
|
}
|
||||||
|
const keys = form.getFieldValue('standardProjectList')
|
||||||
|
// 增加数据后重新赋值
|
||||||
|
this.model.standardProjectList.splice(index + 1, 0, obj)
|
||||||
|
// keys.splice(index , 0, obj)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
standardProjectList: keys
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除标准项目
|
||||||
|
removeStandardProject (k) {
|
||||||
|
// 如果长度是1的话则不进行删除操作
|
||||||
|
if (this.model.standardProjectList.length === 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const {form} = this
|
||||||
|
// // can use data-binding to get
|
||||||
|
const standardProjectList = form.getFieldValue('standardProjectList')
|
||||||
|
// 把循环的dom元素删除
|
||||||
|
this.model.standardProjectList.splice(k, 1)
|
||||||
|
// 把绑定在dom里面的值删除
|
||||||
|
standardProjectList.splice(k, 1)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// 重新赋值
|
||||||
|
form.setFieldsValue({
|
||||||
|
standardProjectList
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -136,5 +136,54 @@ export default {
|
|||||||
{required: true, message: '请输入标准名称'},
|
{required: true, message: '请输入标准名称'},
|
||||||
],
|
],
|
||||||
validateTrigger: ['blur']
|
validateTrigger: ['blur']
|
||||||
|
},
|
||||||
|
// 标准项目-标准编号
|
||||||
|
standProjectStandardNumber: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请输入标准编号'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['blur']
|
||||||
|
},
|
||||||
|
// 标准项目-标准名称
|
||||||
|
standProjectStandardName: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请输入标准名称'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['blur']
|
||||||
|
},
|
||||||
|
// 标准项目-标准类别
|
||||||
|
standProjectStandardType: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请选择标准类别'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['change']
|
||||||
|
},
|
||||||
|
// 标准项目-制修订
|
||||||
|
standProjectEdit: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请选择制修订'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['change']
|
||||||
|
},
|
||||||
|
// 标准项目-宣贯人
|
||||||
|
standProjectPropagator: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请选择宣贯人'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['change']
|
||||||
|
},
|
||||||
|
// 标准项目-宣贯时间
|
||||||
|
standProjectPromulgationTime: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请选择宣贯时间'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['change']
|
||||||
|
},
|
||||||
|
// 标准项目-宣贯地点
|
||||||
|
standProjectPromotionPlace: {
|
||||||
|
rules: [
|
||||||
|
{required: true, message: '请选择宣贯地点'},
|
||||||
|
],
|
||||||
|
validateTrigger: ['blur']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user