修改虚拟清单详情细节问题
This commit is contained in:
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="$t('batSetting')"
|
||||
:width="900"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('scopeOfApplication')">{{$t('scopeOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.scopeOfApplication"
|
||||
@input="handleInput('scopeOfApplication')"
|
||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode=""/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.certificationType"
|
||||
@input="handleInput('certificationType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode=""/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.certificationLevel"
|
||||
@input="handleInput('certificationLevel')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode=""/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.areaOfResponsibility"
|
||||
@input="handleInput('areaOfResponsibility')"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode=""/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
this.visible = true
|
||||
},
|
||||
handleOk() {
|
||||
this.visible = false
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="Virtual-detail-header" style="position: fixed;top: 0">
|
||||
<div class="Virtual-detail-title">
|
||||
<span style="line-height: 74px;display: inline-block;float: left">
|
||||
<a-icon type="arrow-left" style="margin-right: 6px;font-size: 26px;"/>
|
||||
<a-icon @click="iconClick" type="arrow-left" style="margin-right: 6px;font-size: 26px;"/>
|
||||
</span>
|
||||
<span>
|
||||
{{this.title}}
|
||||
@@ -124,12 +124,24 @@
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
<addModel ref="addModelRef"/>
|
||||
<editModel ref="editModelRef"/>
|
||||
<UpdateLog ref="UpdateLogRef"/>
|
||||
<batSetting ref="batSettingRef"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -138,6 +150,8 @@
|
||||
import addModel from './addModel'
|
||||
import editModel from './editModel'
|
||||
import UpdateLog from '@/components/UpdateLog/index'
|
||||
import batSetting from './batSetting'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'virtualListDetails',
|
||||
@@ -145,7 +159,8 @@
|
||||
ImportFile,
|
||||
addModel,
|
||||
editModel,
|
||||
UpdateLog
|
||||
UpdateLog,
|
||||
batSetting
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -307,7 +322,10 @@
|
||||
}
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
isTrue: false
|
||||
isTrue: false,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -344,26 +362,99 @@
|
||||
handleExport() {
|
||||
|
||||
},
|
||||
//复制
|
||||
copyClick() {
|
||||
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
batSettingClick() {
|
||||
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
handleDel() {
|
||||
this.$refs.editModelRef.editModel()
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
edit() {
|
||||
|
||||
edit(item) {
|
||||
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
},
|
||||
deleteLib() {
|
||||
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
getAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
iconClick() {
|
||||
this.$router.push({
|
||||
path: '/virtualList'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -497,6 +588,11 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-input .ant-select-selection {
|
||||
|
||||
Reference in New Issue
Block a user