Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-08-09 10:22:53 +08:00
4 changed files with 99 additions and 37 deletions
+3
View File
@@ -1249,4 +1249,7 @@ module.exports = {
Paraname: 'Para Name',
Parabatch: 'Para Batch',
freeze:'Please select the configuration you want to freeze',
optionDropDownBox:'Option drop - down box',
attachmentUpload:'file',
textInput:'Text Input',
}
+3
View File
@@ -1349,6 +1349,9 @@ module.exports = {
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
created: '创建时间',
updated:'更新时间',
optionDropDownBox:'下拉选择',
attachmentUpload:'附件上传',
textInput:'文本输入',
Paraname: '参数名称',
Parabatch: '参数批次',
freeze:'请选择冻结配置',
@@ -24,7 +24,12 @@
:loading="loading">
<span slot="operation" slot-scope="text,record">
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
<a @click="deleteData">{{$t('delete')}}</a>
<a @click="deleteData(record)">{{$t('delete')}}</a>
</span>
<span slot="lableType" slot-scope="text,record">
<span v-if="text == 3">{{$t('optionDropDownBox')}}</span>
<span v-if="text == 7">{{$t('attachmentUpload')}}</span>
<span v-if="text == 8">{{$t('textInput')}}</span>
</span>
</a-table>
<div class="page" v-if="dataList.length > 0">
@@ -51,7 +56,7 @@
</template>
<script>
import { getAction, postAction, downloadFile,deleteAction } from '@/api/manage'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import countryCardReleaseModelAdd from './countryCardReleaseModelAdd'
export default {
@@ -62,12 +67,12 @@
data() {
return {
url: {
list: '',
deleteOne: ''
list: '/problemKnowledgeBase/countryCardTempEO/page',
deleteOne: '/problemKnowledgeBase/countryCardTempEO/deleteBatch'
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
@@ -75,21 +80,22 @@
columns: [
{
title: this.$t('LabelName'),
dataIndex: 'LabelName',
dataIndex: 'lableName',
align: 'center',
ellipsis: true,
width: 200
},
{
title: this.$t('LabelType'),
dataIndex: 'LabelType',
dataIndex: 'lableType',
align: 'center',
ellipsis: true,
width: 200
width: 200,
scopedSlots: { customRender: 'lableType' }
},
{
title: this.$t('DisplayOrder'),
dataIndex: 'DisplayOrder',
dataIndex: 'orderNum',
align: 'center',
ellipsis: true,
width: 160
@@ -109,6 +115,8 @@
methods: {
getData() {
this.visible = true
this.pageNo = 1
this.replacePage()
},
handleCancel() {
this.visible = false
@@ -132,10 +140,10 @@
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
deleteAction(_this.url.deleteOne, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.replacePage()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -158,7 +166,7 @@
pageSize: this.pageSize
}
this.loading = true
postAction(this.url.list, query).then((res) => {
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
@@ -18,10 +18,10 @@
<span class="title-text-text"
:title="$t('LabelName')">{{$t('LabelName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="LabelName">
<a-form-model-item class="itemModel" prop="lableName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.LabelName"
v-model="formInline.lableName"
:placeholder="$t('PleaseEnter')+$t('LabelName')"/>
</a-form-model-item>
</div>
@@ -35,20 +35,26 @@
<span class="title-text-text"
:title="$t('LabelType')">{{$t('LabelType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="LabelType">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.LabelType"
:placeholder="$t('PleaseEnter')+$t('LabelType')"/>
<a-form-model-item class="itemModel" prop="lableType">
<a-select :placeholder="$t('PleaseSelect')+$t('LabelType')"
@change="lableTypeChange"
v-model="formInline.lableType">
<a-select-option v-for="(item, key) in lableTypeList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="isDisplay">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('dropDownOptions')">{{$t('dropDownOptions')}}</span>
</div>
@@ -68,10 +74,10 @@
<span class="title-text-text"
:title="$t('DisplayOrder')">{{$t('DisplayOrder')}}</span>
</div>
<a-form-model-item class="itemModel" prop="DisplayOrder">
<a-form-model-item class="itemModel" prop="orderNum">
<a-input-number class="box-input"
:disabled="disabled"
v-model="formInline.DisplayOrder"
v-model="formInline.orderNum"
:placeholder="$t('PleaseEnter')+$t('DisplayOrder')"/>
</a-form-model-item>
</div>
@@ -84,10 +90,10 @@
<span class="title-text-text"
:title="$t('associatedWebsite')">{{$t('associatedWebsite')}}</span>
</div>
<a-form-model-item class="itemModel" prop="associatedWebsite">
<a-form-model-item class="itemModel" prop="relevantUrl">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.associatedWebsite"
v-model="formInline.relevantUrl"
:placeholder="$t('PleaseEnter')+$t('associatedWebsite')"/>
</a-form-model-item>
</div>
@@ -100,11 +106,11 @@
<span class="title-text-text"
:title="$t('describe')">{{$t('describe')}}</span>
</div>
<a-form-model-item class="itemModel" prop="describe">
<a-form-model-item class="itemModel" prop="description">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('describe')"
:disabled="disabled"
v-model="formInline.describe" :rows="4"/>
v-model="formInline.description" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
@@ -131,41 +137,56 @@
disabled: false,
confirmLoading: false,
formInline: {},
isDisplay: false,
lableTypeList: [
{
name: this.$t('optionDropDownBox'),
value: '3'
},
{
name: this.$t('attachmentUpload'),
value: '7'
},
{
name: this.$t('textInput'),
value: '8'
}
],
rules: {
LabelName: [
lableName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
message: this.$t('LabelName') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
message: this.$t('LabelName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
LabelType: [
lableType: [
{
required: true,
message: this.$t('problemLabel') + this.$t('cannotEmpty'),
message: this.$t('LabelType') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
DisplayOrder: [
orderNum: [
{
required: true,
message: this.$t('DisplayOrder') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
associatedWebsite: [
relevantUrl: [
{
max: 100,
message: this.$t('associatedWebsite') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'blur'
}
],
describe: [
description: [
{
max: 300,
message: this.$t('describe') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
@@ -173,12 +194,23 @@
}
]
},
title: ''
title: '',
url: {
add: '/problemKnowledgeBase/countryCardTempEO/add',
edit: '/problemKnowledgeBase/countryCardTempEO/edit'
}
}
},
mounted() {
},
methods: {
lableTypeChange(event) {
if (event == 3) {
this.isDisplay = true
} else {
this.isDisplay = false
}
},
dropDownOptionsClick() {
this.$refs.optionMaintenanceRef.getData()
},
@@ -205,7 +237,23 @@
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
if (this.formInline.id) {
url = this.url.edit
} else {
url = this.url.add
}
postAction(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('countryCardReleaseModelAddForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},