[update] 企标详情提交问题
This commit is contained in:
@@ -32,7 +32,7 @@ const shareStandard = (params) => postAction('/personal/lawsStandardSharing/ente
|
|||||||
// 企标详情-获取更新记录
|
// 企标详情-获取更新记录
|
||||||
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
|
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
|
||||||
// 企标详情-提交问题
|
// 企标详情-提交问题
|
||||||
const detailSubmitQuestion = (params) => postAction('', params)
|
const detailSubmitQuestion = (params) => postAction('/laws/library/lawsProblemLibrary/addProblem/QB', params)
|
||||||
// 企标详情-企标评价
|
// 企标详情-企标评价
|
||||||
const detailEvaluate = (standardId, params) => getAction('/laws/standard/enterprise/evaluateDetailForESInfo/' + `${standardId}`, params)
|
const detailEvaluate = (standardId, params) => getAction('/laws/standard/enterprise/evaluateDetailForESInfo/' + `${standardId}`, params)
|
||||||
|
|
||||||
|
|||||||
@@ -122,8 +122,8 @@ import '@assets/less/common.less'
|
|||||||
import { FieldType } from '@/enums/commonEnums'
|
import { FieldType } from '@/enums/commonEnums'
|
||||||
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
|
||||||
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
||||||
import UpdateRecordModal from '../../../standardRegulationLibrary/commonPage/modules/UpdateRecordModal'
|
import UpdateRecordModal from './module/UpdateRecordModal'
|
||||||
import SubmitQuestionModal from '../../../standardRegulationLibrary/commonPage/modules/SubmitQuestionModal'
|
import SubmitQuestionModal from './module/SubmitQuestionModal'
|
||||||
import EnterpriseStandardEvaluateModal from './module/EnterpriseStandardEvaluateModal'
|
import EnterpriseStandardEvaluateModal from './module/EnterpriseStandardEvaluateModal'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 提交问题
|
// 提交问题
|
||||||
submitQuestion () {
|
submitQuestion () {
|
||||||
this.$refs.submitQuestionModal.open()
|
this.$refs.submitQuestionModal.open(this.detailData.standard_number)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-22
@@ -23,7 +23,7 @@
|
|||||||
<!-- 项目-->
|
<!-- 项目-->
|
||||||
<a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('project')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('project')" v-decorator="['project', validatorRules.project]">
|
<a-select :placeholder="$t('pleaseSelect') + $t('project')" v-decorator="['project', validatorRules.project]">
|
||||||
<a-select-option v-for="item in projectSelectOptions" :key="item">{{ item }}</a-select-option>
|
<a-select-option v-for="item in projectSelectOptions" :key="item.id">{{ item.projectName }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -38,22 +38,15 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<!-- 问题发生时间-->
|
<!-- 提问时间-->
|
||||||
<a-form-item :label="$t('standardRegulationLibrary.standardDetail.problemOccurrenceTime')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('standardRegulationLibrary.standardDetail.problemOccurrenceTime')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-date-picker class="box-input"
|
<a-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardDetail.problemOccurrenceTime')"
|
||||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardDetail.problemOccurrenceTime')"
|
|
||||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||||
v-decorator="['problemOccurrenceTime', validatorRules.problemOccurrenceTime]"
|
v-decorator="['quizTime', validatorRules.quizTime]"
|
||||||
|
showTime
|
||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
|
||||||
<!-- 回答人-->
|
|
||||||
<a-form-item :label="$t('standardRegulationLibrary.standardDetail.respondent')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
||||||
<user-selection v-decorator="['respondent', validatorRules.respondent]"
|
|
||||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardDetail.respondent')" />
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<!-- 问题描述-->
|
<!-- 问题描述-->
|
||||||
<a-form-item :label="$t('standardRegulationLibrary.standardDetail.problemDescription')"
|
<a-form-item :label="$t('standardRegulationLibrary.standardDetail.problemDescription')"
|
||||||
@@ -73,12 +66,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import UserSelection from '@/components/selection/UserSelection.vue'
|
|
||||||
import { detailSubmitQuestion } from '@/api/enterpriseStandardLibraryApi'
|
import { detailSubmitQuestion } from '@/api/enterpriseStandardLibraryApi'
|
||||||
|
import { getCarTypeProjectList } from '../../../../../api/api'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SubmitQuestionModal',
|
name: 'SubmitQuestionModal',
|
||||||
components: { UserSelection },
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
width: 800,
|
width: 800,
|
||||||
@@ -119,15 +112,10 @@ export default {
|
|||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
// 问题发生时间
|
// 问题发生时间
|
||||||
problemOccurrenceTime: {
|
quizTime: {
|
||||||
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.standardDetail.problemOccurrenceTime') }],
|
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.standardDetail.problemOccurrenceTime') }],
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
},
|
},
|
||||||
// 回答人
|
|
||||||
respondent: {
|
|
||||||
rules: [{ required: false, message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.standardDetail.respondent') }],
|
|
||||||
validateTrigger: 'change'
|
|
||||||
},
|
|
||||||
// 问题描述
|
// 问题描述
|
||||||
problemDescription: {
|
problemDescription: {
|
||||||
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('standardRegulationLibrary.standardDetail.problemDescription') }],
|
rules: [{ required: true, message: this.$t('pleaseEnter') + this.$t('standardRegulationLibrary.standardDetail.problemDescription') }],
|
||||||
@@ -139,9 +127,29 @@ export default {
|
|||||||
projectSelectOptions: [] // 项目下拉数据
|
projectSelectOptions: [] // 项目下拉数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.initProjectOptions()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open () {
|
open (standardNumber) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
const param = {}
|
||||||
|
param.standardNumber = standardNumber
|
||||||
|
param.quizTime = new Date().getFullYear() + '-' + new Date().getMonth() + '-' + new Date().getDay() + ' ' +
|
||||||
|
new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(param, 'standardNumber', 'quizTime'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取项目下拉框数据
|
||||||
|
initProjectOptions () {
|
||||||
|
getCarTypeProjectList().then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.projectSelectOptions = res.result
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
if (this.confirmLoading) return
|
if (this.confirmLoading) return
|
||||||
@@ -149,7 +157,6 @@ export default {
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const param = Object.assign({}, values)
|
const param = Object.assign({}, values)
|
||||||
param.id = this.model.id
|
|
||||||
detailSubmitQuestion(param).then(res => {
|
detailSubmitQuestion(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user