参数项查看页修改
This commit is contained in:
@@ -38,11 +38,19 @@
|
||||
<span>{{$t('configure')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="configIds">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.configIds"
|
||||
:options="dictOptions"
|
||||
:placeholder="$t('PleaseSelect')+$t('configure')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"/>
|
||||
<!-- <j-multi-select-tag class="box-input" v-model="formInline.configIds"-->
|
||||
<!-- :options="dictOptions"-->
|
||||
<!-- :placeholder="$t('PleaseSelect')+$t('configure')"-->
|
||||
<!-- :type="'select'"-->
|
||||
<!-- :triggerChange="false"/>-->
|
||||
<a-select v-model="formInline.configIds" class="box-input" mode='multiple' :placeholder="$t('PleaseSelect')+$t('configure')">
|
||||
<a-select-option
|
||||
v-for="mode in dictOptions"
|
||||
:key="mode.value"
|
||||
:value="mode.value">
|
||||
{{ mode.label }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -78,7 +86,6 @@
|
||||
<a-form-model-item class="itemModel" :prop="required?'separator':''">
|
||||
<!-- :disabled="disabled"-->
|
||||
<a-input class="box-input"
|
||||
|
||||
v-model="formInline.separator"
|
||||
:placeholder="$t('PleaseEnter')+$t('MergeSeparator')"/>
|
||||
</a-form-model-item>
|
||||
@@ -122,7 +129,6 @@ export default {
|
||||
rules: {
|
||||
separator:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('MergeSeparator'), trigger: 'change' },
|
||||
// { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' },
|
||||
],
|
||||
certCategory:[
|
||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('certificationCategory'), trigger: 'change' },
|
||||
@@ -226,6 +232,7 @@ export default {
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
this.required = false
|
||||
this.$refs.ruleForm.resetFields()
|
||||
},
|
||||
certCategoryName(value){
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<span>{{$t('configure')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="configIds">
|
||||
<a-select v-model="formInline.configIds" class="code-mode-select" :placeholder="$t('PleaseSelect')+$t('configure')">
|
||||
<a-select v-model="formInline.configIds" class="box-input" :placeholder="$t('PleaseSelect')+$t('configure')">
|
||||
<a-select-option
|
||||
v-for="mode in dictOptions"
|
||||
:key="mode.value"
|
||||
|
||||
@@ -89,39 +89,48 @@
|
||||
{{$t('CustomExport')}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="titleName" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
</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"
|
||||
:current="pageNo"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
<div style="width: 100%">
|
||||
<!-- 表格-10控件-->
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
|
||||
:formInline='formInline' :currentPersonRole='currentPersonRole'
|
||||
@getDataSource="getDataSource"
|
||||
@handlePreservation="handlePreservation"
|
||||
@value='value'
|
||||
@listReset='listReset' @LoginUserType='LoginUserType'/>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <a-table-->
|
||||
<!-- ref="table"-->
|
||||
<!-- size="middle"-->
|
||||
<!-- :loading="loading"-->
|
||||
<!-- :pagination="false"-->
|
||||
<!-- :scroll="{x: true}"-->
|
||||
<!-- rowKey="id"-->
|
||||
<!-- :data-source="dataSource"-->
|
||||
<!-- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
|
||||
<!-- :columns="columns"-->
|
||||
<!-- >-->
|
||||
<!-- <span slot="titleName" slot-scope="text,record" :title="text">-->
|
||||
<!-- {{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span slot="operation" slot-scope="text,record">-->
|
||||
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
|
||||
<!-- <a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>-->
|
||||
<!-- </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"-->
|
||||
<!-- :current="pageNo"-->
|
||||
<!-- @change="pageOnChange"-->
|
||||
<!-- @showSizeChange="SizeChange"-->
|
||||
<!-- />-->
|
||||
<!-- </div>-->
|
||||
<conventionalModel :url="url" ref="conventionalModel"/>
|
||||
<customelModel :url="url" ref="customelModel"/>
|
||||
</a-card>
|
||||
@@ -130,6 +139,7 @@
|
||||
<script>
|
||||
import { getAction,postAction } from '../../../api/manage'
|
||||
import axios from 'axios'
|
||||
import TableCollection from '@/components/tableCollection/index1'
|
||||
import conventionalModel from './commponts/conventionalmodle'
|
||||
import customelModel from './commponts/customexportmodle'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
@@ -140,6 +150,7 @@ export default {
|
||||
components: {
|
||||
conventionalModel,
|
||||
customelModel,
|
||||
TableCollection,
|
||||
PersonnelSelection
|
||||
},
|
||||
data(){
|
||||
@@ -212,7 +223,7 @@ export default {
|
||||
props: {
|
||||
},
|
||||
mounted() {
|
||||
this.Getlist()
|
||||
// this.Getlist()
|
||||
this.getTableList()
|
||||
},
|
||||
methods:{
|
||||
@@ -302,6 +313,82 @@ export default {
|
||||
},
|
||||
onSelectChange() {
|
||||
|
||||
},
|
||||
getDataSource(data) {
|
||||
this.dataSource = data
|
||||
},
|
||||
handlePreservation(num) {
|
||||
let _this = this
|
||||
let postDate = []
|
||||
let data = JSON.parse(JSON.stringify(this.dataSource))
|
||||
let selectedRowKeysValue = []
|
||||
data.forEach(res => {
|
||||
if (res.state == 'Wait Fill' || res.state == '待填写') {
|
||||
selectedRowKeysValue.push(res)
|
||||
}
|
||||
})
|
||||
for (let i = 0; i < selectedRowKeysValue.length; i++) {
|
||||
let postDateobj = {}
|
||||
let itemIn = Object.keys(selectedRowKeysValue[i])
|
||||
for (let j = 0; j < itemIn.length; j++) {
|
||||
if (itemIn[j] !== 'sdt') {
|
||||
if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
|
||||
postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
|
||||
for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
|
||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
|
||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
|
||||
}
|
||||
if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
|
||||
selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
postDateobj.id = selectedRowKeysValue[i].id
|
||||
postDate.push(postDateobj)
|
||||
}
|
||||
let configDataList = { configDataList: postDate }
|
||||
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
|
||||
if (num && num == 1) {
|
||||
this.textLoading = true
|
||||
}
|
||||
let query = {
|
||||
...configDataList,
|
||||
paramsManifestId: this.paramsManifest.id
|
||||
}
|
||||
postAction('/params/collectManifest/save', query).then((res) => {
|
||||
if (res.success) {
|
||||
if (num && num == 1) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
this.textLoading = false
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (this.currentPersonRole == 'dre') {
|
||||
this.handlePreservation()
|
||||
}
|
||||
}, 10000)
|
||||
} else {
|
||||
if (num && num == 1) {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
this.textLoading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (num && num == 1) {
|
||||
this.$message.warning(this.$t('theCurrentListSaved'))
|
||||
}
|
||||
}
|
||||
},
|
||||
LoginUserType(val, currentPersonRole, userType) {
|
||||
this.RoleType = []
|
||||
if (this.currentPersonRole == '') {
|
||||
this.currentPersonRole = currentPersonRole || userType || val[0].value
|
||||
}
|
||||
this.RoleType = val
|
||||
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
|
||||
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
|
||||
},
|
||||
GetgetTableList() {
|
||||
this.$refs.CollectionTabel.getTableList()
|
||||
@@ -326,19 +413,23 @@ export default {
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getTableList()
|
||||
this.$refs.CollectionTabel.getTableList()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.formInline = {}
|
||||
this.$refs.CollectionTabel.getTableListReset()
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.$emit('handlePreservation')
|
||||
this.getTableList()
|
||||
},
|
||||
pageOnChange() {
|
||||
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.$emit('handlePreservation')
|
||||
this.getTableList()
|
||||
},
|
||||
SizeChange() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user