修改参数模板管理
This commit is contained in:
@@ -2038,4 +2038,7 @@ module.exports = {
|
|||||||
experienceReference:'Experience reference',
|
experienceReference:'Experience reference',
|
||||||
onlyTheDataFilledUrged:'Only the data whose status is to be filled in or To be processed by eng. interface can be urged',
|
onlyTheDataFilledUrged:'Only the data whose status is to be filled in or To be processed by eng. interface can be urged',
|
||||||
onlyTheDataWhoseStatusUrged:'Only the data whose status is to be filled in can be urged',
|
onlyTheDataWhoseStatusUrged:'Only the data whose status is to be filled in can be urged',
|
||||||
|
maintainer:'Maintainer',
|
||||||
|
setupMaintainer:'Setup maintainer',
|
||||||
|
maximumOfBeSelected:'A maximum of 30 personnel can be selected',
|
||||||
}
|
}
|
||||||
@@ -3772,4 +3772,7 @@ module.exports = {
|
|||||||
experienceReference:'经验参考',
|
experienceReference:'经验参考',
|
||||||
onlyTheDataFilledUrged:'只能催办状态为待填写或待工程接口人处理的数据',
|
onlyTheDataFilledUrged:'只能催办状态为待填写或待工程接口人处理的数据',
|
||||||
onlyTheDataWhoseStatusUrged:'只能催办状态为待填写的数据',
|
onlyTheDataWhoseStatusUrged:'只能催办状态为待填写的数据',
|
||||||
|
maintainer:'维护人',
|
||||||
|
setupMaintainer:'设置维护人',
|
||||||
|
maximumOfBeSelected:'最多只能选择30个人员',
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="500"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form>
|
||||||
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="24">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('maintainer')">{{$t('maintainer')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="maintainerName">
|
||||||
|
<PersonnelSelection :query="{db_field_name:'maintainer',db_field_txt:$t('maintainer')}"
|
||||||
|
:personneQuery="formInline"
|
||||||
|
v-if="visible"
|
||||||
|
class="maintainerClass"
|
||||||
|
@change="PersonnelSelectionChange"
|
||||||
|
v-model="formInline.maintainerName"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'setupMaintainerModel',
|
||||||
|
components: {
|
||||||
|
PersonnelSelection
|
||||||
|
},
|
||||||
|
props: ['url'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {},
|
||||||
|
confirmLoading: false,
|
||||||
|
visible: false,
|
||||||
|
rules: {
|
||||||
|
maintainerName: [
|
||||||
|
{ required: true, message: this.$t('PleaseSelect') + this.$t('maintainer'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
disabled: false,
|
||||||
|
projectNameList: [],
|
||||||
|
title: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
editModel(value) {
|
||||||
|
this.visible = true
|
||||||
|
this.title = this.$t('setupMaintainer')
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = JSON.parse(JSON.stringify(value))
|
||||||
|
this.$refs['ruleForm'].clearValidate()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
let maintainerName = query.maintainerName.split(',')
|
||||||
|
if (maintainerName.length > 30) {
|
||||||
|
this.$message.warning(this.$t('maximumOfBeSelected'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Object.keys(query).forEach(res => {
|
||||||
|
if (query[res] && query[res] instanceof Array) {
|
||||||
|
query[res] = query[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.confirmLoading = true
|
||||||
|
putAction('params/template/edit', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('setupMaintainerModelForm')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
this.confirmLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleInput(value) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.$refs.ruleForm.validateField([value])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
PersonnelSelectionChange(value, id) {
|
||||||
|
this.formInline[value] = id
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
|
projectNameChange(value) {
|
||||||
|
console.log(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.formAdd .ant-form-item-label {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd .ant-form-item-control-wrapper {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.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;
|
||||||
|
}
|
||||||
|
.ant-input-disabled {
|
||||||
|
color: rgba(0, 0, 0, 0.65) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
/*align-items: center;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 74px;
|
||||||
|
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: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 90px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .add-input {
|
||||||
|
min-height: 135px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .maintainerClass .itemModelStand-input{
|
||||||
|
height: 120px;
|
||||||
|
}
|
||||||
|
::v-deep .maintainerClass .itemModelStand-input .ant-select-selection--multiple{
|
||||||
|
min-height: 120px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -69,13 +69,28 @@
|
|||||||
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
|
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" :disabled="record.status == '1' ? true : false" v-has="'params:template:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
<a class="text-operation" v-has="'params:template:setupMaintainer'"
|
||||||
|
@click="setupMaintainerClick(record)">{{$t('setupMaintainer')}}</a>
|
||||||
|
|
||||||
|
<a class="text-operation"
|
||||||
|
:disabled="record.status == '1' || record.authorityFlag == '1'? true : false"
|
||||||
|
v-has="'params:template:edit'"
|
||||||
|
@click="edit(record)">{{$t('edit')}}</a>
|
||||||
|
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-has="'params:template:publish'"
|
v-has="'params:template:publish'"
|
||||||
@click="withdrawOrRelease(record)">{{record.status && record.status == '1'? $t('withdraw') : $t('release')}}</a>
|
:disabled="record.authorityFlag == '1'? true : false"
|
||||||
<a class="text-operation" :disabled="record.status == '1' ? true : false" v-has="'params:template:maintenanceTemplate'"
|
@click="withdrawOrRelease(record)">
|
||||||
|
{{record.status && record.status == '1'? $t('withdraw') : $t('release')}}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="text-operation"
|
||||||
|
:disabled="record.status == '1' || record.authorityFlag == '1'? true : false"
|
||||||
|
v-has="'params:template:maintenanceTemplate'"
|
||||||
@click="maintenanceTemplateClick(record)">{{$t('maintenanceTemplate')}}</a>
|
@click="maintenanceTemplateClick(record)">{{$t('maintenanceTemplate')}}</a>
|
||||||
<a class="text-operation" :disabled="record.status == '1' ? true : false"
|
|
||||||
|
<a class="text-operation"
|
||||||
|
:disabled="record.status == '1' || record.authorityFlag == '1'? true : false"
|
||||||
v-has="'params:template:delete'" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
v-has="'params:template:delete'" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -94,6 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<JLoading :loading="JLoading">{{ $t('pleaseWaitWhileRunning') }}</JLoading>
|
<JLoading :loading="JLoading">{{ $t('pleaseWaitWhileRunning') }}</JLoading>
|
||||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||||
|
<setupMaintainerModel ref="setupMaintainerModelRef" @setupMaintainerModelForm="setupMaintainerModelForm"/>
|
||||||
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
|
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
|
||||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
@@ -118,40 +134,44 @@
|
|||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import addModel from './components/addModel'
|
import addModel from './components/addModel'
|
||||||
import axios from 'axios'
|
import setupMaintainerModel from './components/setupMaintainerModel'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import axios from 'axios'
|
||||||
import eventBUs from '../../../common/event'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import Vue from 'vue'
|
import eventBUs from '../../../common/event'
|
||||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
import Vue from 'vue'
|
||||||
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: {
|
components: {
|
||||||
addModel,
|
addModel,
|
||||||
|
setupMaintainerModel
|
||||||
},
|
},
|
||||||
mixins:[ResizeHeader, ResizeColumnProvide],
|
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token: Vue.ls.get(ACCESS_TOKEN),
|
||||||
loading: false,
|
loading: false,
|
||||||
toggleSearchStatus: false,
|
toggleSearchStatus: false,
|
||||||
JLoading:false,
|
JLoading: false,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRowKeysArray: '',
|
selectedRowKeysArray: '',
|
||||||
orderBy: '1',
|
orderBy: '1',
|
||||||
orderByField: '',
|
orderByField: '',
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {
|
rules: {
|
||||||
paramsTemplateName:[
|
paramsTemplateName: [
|
||||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('templateName'), trigger: 'change' },
|
{ required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' },
|
||||||
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
{ min: 1, max: 50, message: this.$t('cantExeed') + '50' + this.$t('characters'), trigger: 'blur' }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -174,15 +194,15 @@ export default {
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
width: 125,
|
width: 125,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter:true,
|
sorter: true,
|
||||||
dataIndex: 'region_dictText',
|
dataIndex: 'region_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('parameterTemplate'),
|
title: this.$t('parameterTemplate'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 200,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter:true,
|
sorter: true,
|
||||||
dataIndex: 'paramsTemplateName',
|
dataIndex: 'paramsTemplateName',
|
||||||
scopedSlots: { customRender: 'projectName' }
|
scopedSlots: { customRender: 'projectName' }
|
||||||
},
|
},
|
||||||
@@ -215,33 +235,40 @@ export default {
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
dataIndex: 'createBy'
|
dataIndex: 'createBy'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('maintainer'),
|
||||||
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
|
dataIndex: 'maintainerName'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('created'),
|
title: this.$t('created'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
width: 200,
|
width: 200,
|
||||||
sorter:true,
|
sorter: true,
|
||||||
ellipsis: true,
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('updated'),
|
title: this.$t('updated'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 200,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter:true,
|
sorter: true,
|
||||||
dataIndex: 'updateTime'
|
dataIndex: 'updateTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 200,
|
width: 280,
|
||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
areaVisible:false,
|
areaVisible: false,
|
||||||
paramsTemplateName: '',
|
paramsTemplateName: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -249,11 +276,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.areaVisible=false
|
this.areaVisible = false
|
||||||
this.$refs['ruleForm'].resetFields()
|
this.$refs['ruleForm'].resetFields()
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
if( this.formInline.paramsTemplateName !== undefined) {
|
if (this.formInline.paramsTemplateName !== undefined) {
|
||||||
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
|
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
|
||||||
}
|
}
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
@@ -283,27 +310,27 @@ export default {
|
|||||||
this.$refs.addModelRef.addModel()
|
this.$refs.addModelRef.addModel()
|
||||||
},
|
},
|
||||||
// 复制
|
// 复制
|
||||||
handlecody(){
|
handlecody() {
|
||||||
if (this.selectedRowKeys.length > 1) {
|
if (this.selectedRowKeys.length > 1) {
|
||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
} else if(this.selectedRowKeys.length == 0){
|
} else if (this.selectedRowKeys.length == 0) {
|
||||||
this.$message.warning(this.$t('pleaseSelectData'))
|
this.$message.warning(this.$t('pleaseSelectData'))
|
||||||
} else {
|
} else {
|
||||||
this.areaVisible=true
|
this.areaVisible = true
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hideModal(){
|
hideModal() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
this.$refs['ruleForm'].resetFields()
|
this.$refs['ruleForm'].resetFields()
|
||||||
},
|
},
|
||||||
withdrawOrRelease(item){
|
withdrawOrRelease(item) {
|
||||||
let _this = this
|
let _this = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: item.status && item.status == '1' ? _this.$t('confirmWithdraw') : _this.$t('confirmRelease'),
|
content: item.status && item.status == '1' ? _this.$t('confirmWithdraw') : _this.$t('confirmRelease'),
|
||||||
onOk() {
|
onOk() {
|
||||||
_this.JLoading = true
|
_this.JLoading = true
|
||||||
if (item.status && item.status == '1'){
|
if (item.status && item.status == '1') {
|
||||||
getAction('params/paramsInfo/withdraw', { paramsTemplateId: item.id }).then((res) => {
|
getAction('params/paramsInfo/withdraw', { paramsTemplateId: item.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(res.result)
|
_this.$message.success(res.result)
|
||||||
@@ -314,7 +341,7 @@ export default {
|
|||||||
_this.JLoading = false
|
_this.JLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
getAction('params/paramsInfo/publish', { paramsTemplateId: item.id }).then((res) => {
|
getAction('params/paramsInfo/publish', { paramsTemplateId: item.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(res.result)
|
_this.$message.success(res.result)
|
||||||
@@ -329,7 +356,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
maintenanceTemplateClick(item){
|
maintenanceTemplateClick(item) {
|
||||||
item.titleNameDesgin = 'maintenance'
|
item.titleNameDesgin = 'maintenance'
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/ParameterTemplateList',
|
path: '/ParameterTemplateList',
|
||||||
@@ -338,11 +365,25 @@ export default {
|
|||||||
},
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
handleDel() {
|
handleDel() {
|
||||||
let param={
|
let param = {
|
||||||
ids: this.selectedRowKeysArray
|
ids: this.selectedRowKeysArray
|
||||||
}
|
}
|
||||||
if (this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys.length > 0) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
let dataSource = []
|
||||||
|
for (let i = 0; i < this.dataSource.length; i++) {
|
||||||
|
for (let j = 0; j < this.selectedRowKeys.length; j++) {
|
||||||
|
if (this.dataSource[i].id == this.selectedRowKeys[j]) {
|
||||||
|
dataSource.push(this.dataSource[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let i = 0; i < dataSource.length; i++) {
|
||||||
|
if (dataSource[i].authorityFlag == '1') {
|
||||||
|
this.$message.warning(this.$t('doNotHavePermissionDeleteData'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('ConfirmBatchDeletion'),
|
content: _this.$t('ConfirmBatchDeletion'),
|
||||||
onOk() {
|
onOk() {
|
||||||
@@ -350,7 +391,7 @@ export default {
|
|||||||
url: '/jero-boot/params/template/deleteBatch',
|
url: '/jero-boot/params/template/deleteBatch',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: param,
|
data: param,
|
||||||
transformRequest: [function (data) {
|
transformRequest: [function(data) {
|
||||||
let ret = ''
|
let ret = ''
|
||||||
for (let it in data) {
|
for (let it in data) {
|
||||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||||
@@ -359,27 +400,33 @@ export default {
|
|||||||
}],
|
}],
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
'X-Access-Token':_this.token
|
'X-Access-Token': _this.token
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then( (res) =>{
|
.then((res) => {
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.selectedRowKeys = []
|
_this.selectedRowKeys = []
|
||||||
_this.getList()
|
_this.getList()
|
||||||
}else{
|
} else {
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch( (error) =>{
|
.catch((error) => {
|
||||||
console.log(error);
|
console.log(error)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setupMaintainerModelForm() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
setupMaintainerClick(item) {
|
||||||
|
this.$refs.setupMaintainerModelRef.editModel(item)
|
||||||
|
},
|
||||||
//编辑
|
//编辑
|
||||||
edit(item) {
|
edit(item) {
|
||||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||||
@@ -437,15 +484,15 @@ export default {
|
|||||||
},
|
},
|
||||||
tableOnChange(pagination, filters, sorter) {
|
tableOnChange(pagination, filters, sorter) {
|
||||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
if(sorter.columnKey == 'region_dictText'){
|
if (sorter.columnKey == 'region_dictText') {
|
||||||
this.orderByField = 'region'
|
this.orderByField = 'region'
|
||||||
} else if(sorter.columnKey == 'paramsTemplateName') {
|
} else if (sorter.columnKey == 'paramsTemplateName') {
|
||||||
this.orderByField = 'params_template_name'
|
this.orderByField = 'params_template_name'
|
||||||
} else if(sorter.columnKey == 'createTime') {
|
} else if (sorter.columnKey == 'createTime') {
|
||||||
this.orderByField = 'create_time'
|
this.orderByField = 'create_time'
|
||||||
} else if(sorter.columnKey == 'updateTime') {
|
} else if (sorter.columnKey == 'updateTime') {
|
||||||
this.orderByField = 'update_time'
|
this.orderByField = 'update_time'
|
||||||
} else{
|
} else {
|
||||||
this.orderByField = sorter.columnKey
|
this.orderByField = sorter.columnKey
|
||||||
}
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
@@ -476,20 +523,20 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
@@ -502,37 +549,39 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input {
|
.box-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
.add-input{
|
|
||||||
|
.add-input {
|
||||||
width: 82%;
|
width: 82%;
|
||||||
}
|
}
|
||||||
.box-button {
|
|
||||||
|
.box-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*margin-top: 2px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-operation {
|
.text-operation {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-title-text-add {
|
.box-title-text-add {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text-add {
|
.title-text-add {
|
||||||
width: 114px;
|
width: 114px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -545,37 +594,37 @@ export default {
|
|||||||
height: 42px;
|
height: 42px;
|
||||||
line-height: 42px;
|
line-height: 42px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input-add {
|
.box-input-add {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemModel {
|
.itemModel {
|
||||||
width: calc(100% - 130px);
|
width: calc(100% - 130px);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Required {
|
.Required {
|
||||||
color: red;
|
color: red;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text-text {
|
.title-text-text {
|
||||||
margin-top: 9px;
|
margin-top: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.formAdd {
|
.formAdd {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-bootom-button {
|
.drawer-bootom-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index:100;
|
z-index: 100;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
@@ -583,20 +632,22 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
.add-text-text{
|
|
||||||
|
.add-text-text {
|
||||||
margin-top: -14px;
|
margin-top: -14px;
|
||||||
}
|
}
|
||||||
::v-deep .ant-table-row:first-child {
|
|
||||||
background: #fff!important;
|
::v-deep .ant-table-row:first-child {
|
||||||
|
background: #fff !important;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table-body {
|
::v-deep .ant-table-body {
|
||||||
background: transparent!important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .ant-table-placeholder{
|
::v-deep .ant-table-placeholder {
|
||||||
margin-top: 8px !important;
|
margin-top: 8px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user