From c54b8e8c7b37e3eced0f8c175db3cb242a175f69 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 25 Sep 2023 17:59:32 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E6=A0=87=E5=87=86=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=94=B9=E6=88=90=E5=9B=9E=E6=98=BE=E7=94=A8value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/customField/AddForm.vue | 7 +- .../selection/StandardModelSelection.vue | 74 ------- .../selection/StandardModelSelectionModal.vue | 203 ------------------ .../selection/StandardSelection.vue | 56 +++-- .../selection/StandardSelectionModal.vue | 82 +++---- .../modules/QuizModal.vue | 6 +- .../standard/EnterpriseStandardList.vue | 2 +- .../modules/EnterpriseStandardModal.vue | 2 +- 8 files changed, 76 insertions(+), 356 deletions(-) delete mode 100644 src/components/selection/StandardModelSelection.vue delete mode 100644 src/components/selection/StandardModelSelectionModal.vue diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index c4562bb2..062c6c34 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -103,11 +103,9 @@ {{ item.dbFieldTxt }} - @@ -309,6 +307,7 @@ export default { } } }, + // 标准模块的区分:1,国内; 2,国外;3,企标 flag: { type: String, default: null diff --git a/src/components/selection/StandardModelSelection.vue b/src/components/selection/StandardModelSelection.vue deleted file mode 100644 index 4eefd4e3..00000000 --- a/src/components/selection/StandardModelSelection.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/src/components/selection/StandardModelSelectionModal.vue b/src/components/selection/StandardModelSelectionModal.vue deleted file mode 100644 index 36f1c439..00000000 --- a/src/components/selection/StandardModelSelectionModal.vue +++ /dev/null @@ -1,203 +0,0 @@ - - - - - diff --git a/src/components/selection/StandardSelection.vue b/src/components/selection/StandardSelection.vue index 249d1a52..ff0e77c1 100644 --- a/src/components/selection/StandardSelection.vue +++ b/src/components/selection/StandardSelection.vue @@ -1,14 +1,14 @@ @@ -19,27 +19,17 @@ export default { name: 'StandardSelection', components: { StandardSelectionModal }, props: { - query: { - type: Object, - default: () => { - return {} - } - }, value: { type: String, default: '' - } - }, - computed: { - isDisabled () { - if (this.query.dbFieldName === 'replaced_standard') { - return true - } - return false - } - }, - data () { - return { + }, + placeholder: { + type: String, + default: '' + }, + isDisabled: { + type: Boolean, + default: false } }, methods: { @@ -49,33 +39,37 @@ export default { }, // 输入框输入监听 indexClick (event) { - console.log(event.target.value) - this.$emit('input', event.target.value) + this.$emit('change', event.target.value) }, modalInput (value) { - this.$emit('input', value) + this.$emit('change', value) }, - modalChange (fieldName, value) { - this.$emit('change', fieldName, value) + modalNameChange (value) { + this.$emit('nameChange', value) } + }, + model: { + prop: 'value', + event: 'change' } } diff --git a/src/components/selection/StandardSelectionModal.vue b/src/components/selection/StandardSelectionModal.vue index 18e989d7..5dbec23b 100644 --- a/src/components/selection/StandardSelectionModal.vue +++ b/src/components/selection/StandardSelectionModal.vue @@ -11,26 +11,27 @@
- - - - - - - - - - - -
- {{$t('reset')}} - {{$t('query')}} -
-
-
+ + + + + + + + + + + +
+ {{$t('reset')}} + {{$t('query')}} +
+
+
{ - return {} - } - }, - standard: { - type: Object, - default: () => { - return {} - } - }, source: { type: [String, Number], default: '1' + }, + value: { + type: String, + default: '' + }, + // 搜索条件中的来源是否不可更改 + disabledSourceSearch: { + type: Boolean, + default: false } }, data () { @@ -117,6 +115,14 @@ export default { align: 'center', width: 150 }, + // 发布日期 + { + title: this.$t('standardSelect.releaseDate'), + dataIndex: 'releaseDate', + align: 'center', + width: 120, + scopedSlots: { customRender: 'text' } + }, { title: this.$t('standardSelect.textState'), dataIndex: 'standardState_dictText', @@ -149,7 +155,7 @@ export default { if (res.success) { this.dataList = res.result.records this.ipagination.total = res.result.total - this.selectedRowKeys = this.standard[this.query.dbFieldName] ? this.standard[this.query.dbFieldName].split(',') : [] + this.selectedRowKeys = this.value.split(',') } else { this.dataList = [] } @@ -174,16 +180,14 @@ export default { }, handleSubmit () { const serialNumber = [] - const replaceStandardId = [] + const serialNameArr = [] if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { - // let content = JSON.parse(JSON.stringify(this.selectedRowList)) this.selectedRowList.forEach(res => { serialNumber.push(res.standardNumber) - replaceStandardId.push(res.id) + serialNameArr.push(res.standardName) }) - this.$emit('input', serialNumber.join(',')) - this.$emit('change', this.query.dbFieldName, replaceStandardId.join(',')) - // this.$emit('changecontent', this.content) + this.$emit('change', serialNumber.join(',')) + this.$emit('nameChange', serialNameArr.join(',')) this.visible = false } else { this.$message.warning(this.$t('selectLeastOne')) diff --git a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue index 37eb870d..48b90032 100644 --- a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue +++ b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue @@ -26,7 +26,7 @@ - { if (res.success) { this.$message.success(this.$t('operationSuccessful'))