Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
@@ -701,4 +701,11 @@ module.exports = {
|
||||
regulatoryTaskConfirmation:'Regulatory task confirmation',
|
||||
certificationStart:'Certification start',
|
||||
certificationEnd:'Certification end',
|
||||
directoryName:'Directory name',
|
||||
batch:'batch',
|
||||
uploadTime:'Upload time',
|
||||
enclosure:'enclosure',
|
||||
// 认证
|
||||
parameterTemplate: 'parameter Template',
|
||||
contentDescription: 'content Description'
|
||||
}
|
||||
@@ -706,4 +706,11 @@ module.exports = {
|
||||
regulatoryTaskConfirmation:'法规任务确认',
|
||||
certificationStart:'认证开始',
|
||||
certificationEnd:'认证结束',
|
||||
directoryName:'目录名称',
|
||||
batch:'批次',
|
||||
uploadTime:'上传时间',
|
||||
enclosure:'附件',
|
||||
// 认证
|
||||
parameterTemplate: '参数模板',
|
||||
contentDescription: '内容说明'
|
||||
}
|
||||
@@ -4,8 +4,8 @@
|
||||
class="upload-text"
|
||||
:multiple="false" :headers="tokenHeader"
|
||||
:action="importUrl+'?cut='+cut"
|
||||
@change="handleImportZip"
|
||||
accept=".zip">
|
||||
@change="handleImport"
|
||||
:accept="accept">
|
||||
<a-icon type="import" :rotate="270"/>
|
||||
{{$t('import')}}
|
||||
</a-upload>
|
||||
@@ -28,12 +28,16 @@
|
||||
isTrue:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
accept:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tokenHeader: {'X-Access-Token': Vue.ls.get(ACCESS_TOKEN)},
|
||||
importUrl: window._CONFIG['domianURL'] + this.url.importZipUrl,
|
||||
importUrl: window._CONFIG['domianURL'] +'/'+ this.url.importZipUrl,
|
||||
cut: '',
|
||||
}
|
||||
},
|
||||
@@ -47,7 +51,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleImportZip(info) {
|
||||
handleImport(info) {
|
||||
this.spinning = true
|
||||
if (info.file.status !== 'uploading') {
|
||||
console.log(info.file, info.fileList)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="false" :accept="'.zip'"/>
|
||||
</div>
|
||||
<div @click="handleAdd" class="operator-text" v-has="'document:getInfoById'">
|
||||
<a-icon type="plus"/>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<span>{{$t('standard')}}</span>
|
||||
</div>
|
||||
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||
v-model="queryParam.standard"></j-input>
|
||||
v-model="queryParam.serialNumber"></j-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -88,7 +88,7 @@
|
||||
{{$t('DocumentStandard')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
</div>
|
||||
<!-- 模板下载-->
|
||||
<div @click="handleModule" class="operator-text" v-if="isTrue">
|
||||
@@ -304,7 +304,7 @@
|
||||
title: this.$t('correspondingStandard'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
dataIndex: 'correspondingStandard_dictText'
|
||||
dataIndex: 'correspondingStandardName'
|
||||
},
|
||||
{
|
||||
title: this.$t('zoneOfApplication'),
|
||||
@@ -455,14 +455,14 @@
|
||||
// fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number
|
||||
fieldList: [
|
||||
{
|
||||
type: 'date',
|
||||
type: '',
|
||||
value: 'shi4Yong4Fan4Wei2',
|
||||
text: this.$t('scopeOfApplication'),
|
||||
dictCode: 'apply_scope'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'date',
|
||||
value: 'status',
|
||||
type: '',
|
||||
value: 'state',
|
||||
text: this.$t('status'),
|
||||
dictCode: 'state'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
@@ -472,13 +472,13 @@
|
||||
text: this.$t('correspondingStandard')
|
||||
},
|
||||
{
|
||||
type: 'date',
|
||||
type: '',
|
||||
value: 'region',
|
||||
text: this.$t('zoneOfApplication'),
|
||||
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
},
|
||||
{
|
||||
type: 'date',
|
||||
type: '',
|
||||
value: 'implementType',
|
||||
text: this.$t('implementationCategory'),
|
||||
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
@@ -622,6 +622,9 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonnelList(){
|
||||
this.getList()
|
||||
},
|
||||
batSettingList() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<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('parameterTemplate')">{{$t('parameterTemplate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="paramsTemplateName">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.paramsTemplateName"
|
||||
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
|
||||
</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('status')">{{$t('status')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="status">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.status"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'params_template_state'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('zoneOfApplication')">{{$t('zoneOfApplication')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="region">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.region"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('contentDescription')">{{$t('contentDescription')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="description">
|
||||
<a-input class="box-input"
|
||||
type="textarea"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.description"
|
||||
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: .8rem" @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: 'addModel',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
rules: {
|
||||
paramsTemplateName: [
|
||||
{ required: true, message: this.$t('pleaseEnter')+ this.$t('parameterTemplate'),trigger: 'change'},
|
||||
{ max: 50, message: this.$t('cantExeed')+ 50 + this.$t('characters'),trigger: 'change'},
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+ this.$t('status'),trigger: 'change'},
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: this.$t('PleaseSelect')+ this.$t('zoneOfApplication'),trigger: 'change'},
|
||||
],
|
||||
description: [
|
||||
{ max: 300, message: this.$t('cantExeed')+ 300 + this.$t('characters'),trigger: 'change'},
|
||||
]
|
||||
},
|
||||
disabled: false,
|
||||
projectNameList: [],
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getNameList()
|
||||
},
|
||||
methods: {
|
||||
getNameList() {
|
||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
this.projectNameList = res.result || []
|
||||
} else {
|
||||
this.projectNameList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.title = '新增'
|
||||
this.formInline = {}
|
||||
},
|
||||
editModel(value) {
|
||||
this.visible = true
|
||||
this.title = '编辑'
|
||||
this.$nextTick(() => {
|
||||
this.formInline = value
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(query).forEach(res => {
|
||||
if (query[res] && query[res] instanceof Array) {
|
||||
query[res] = query[res].join(',')
|
||||
}
|
||||
})
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.$emit('addModelList')
|
||||
} 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: 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;
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
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% - 130px);
|
||||
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%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,396 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('zoneOfApplication')">
|
||||
<span>{{$t('zoneOfApplication')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.region"
|
||||
:placeholder="$t('PleaseSelect')+$t('zoneOfApplication')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'region'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('parameterTemplate')">
|
||||
<span>{{$t('parameterTemplate')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
|
||||
v-model="queryParam.paramsTemplateName"></a-input>
|
||||
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('status')">
|
||||
<span>{{$t('status')}}</span>
|
||||
</div>
|
||||
<j-dict-select-tag class="box-input" v-model="queryParam.status"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'params_template_state'"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="handleAdd" class="operator-text" v-has="'document:getInfoById'">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
<div @click="handleCode" class="operator-text" v-has="'document:getInfoById'">
|
||||
<a-icon type="copy"/>
|
||||
{{$t('copy')}}
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</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="projectName" slot-scope="text,record">
|
||||
<a @click="entryNameClick(record)">{{text}}</a>
|
||||
</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"
|
||||
@change="pageOnChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import addModel from './components/addModel'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
addModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
toggleSearchStatus: false,
|
||||
selectedRowKeys: [],
|
||||
formInline: {},
|
||||
rules: {},
|
||||
visible: false,
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: 'params/template/list',
|
||||
add: 'params/template/add',
|
||||
edit: 'params/template/edit',
|
||||
deleteBatch: 'params/template/delete',
|
||||
deleteAll: 'params/template/deleteBatch'
|
||||
},
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
title: '新增',
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('zoneOfApplication'),
|
||||
align: 'center',
|
||||
dataIndex: 'region_dictText',
|
||||
// width: 10%,
|
||||
},
|
||||
{
|
||||
title: this.$t('parameterTemplate'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName',
|
||||
scopedSlots: { customRender: 'projectName' },
|
||||
// width: 10%,
|
||||
},
|
||||
{
|
||||
title: this.$t('contentDescription'),
|
||||
align: 'center',
|
||||
dataIndex: 'description',
|
||||
// width: 10%
|
||||
},
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
dataIndex: 'state_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('createTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('updateTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'updateTime'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
queryParam: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = value
|
||||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
// 复制
|
||||
handleCode() {
|
||||
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
deleteAction(_this.url.deleteAll, { 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'))
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
},
|
||||
//删除
|
||||
deleteLib(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//虚拟清单名称事件
|
||||
entryNameClick(item) {
|
||||
// let newUrl = this.$router.resolve({
|
||||
// path: '/ProjectDetails',
|
||||
// query: item
|
||||
// })
|
||||
// window.open(newUrl.href, '_blank')
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.getList()
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
addModelList() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.queryParam[value] = id
|
||||
this.queryParam = { ...this.queryParam }
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text-add {
|
||||
width: 114px;
|
||||
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;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.box-input-add {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
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%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
||||
@@ -90,65 +90,17 @@
|
||||
<div class="process-content">
|
||||
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div class="process-content-content">
|
||||
<div class="process-content-content" v-for="(item,index) in regulatoryCertificationTaskPlanList" :key="index">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认打扫房间十大科技孵化开具收费电视</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="process-content-content">
|
||||
<img src="../../../assets/wancheng.png" class="process-content-left" alt="">
|
||||
<div class="process-content-right">
|
||||
<div class="process-content-right-top">法规清单确认</div>
|
||||
<div class="process-content-right-button">2021-10-13</div>
|
||||
<div class="process-content-right-top">{{item.name}}</div>
|
||||
<div class="process-content-right-button">{{item.time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process-content-right-xian"></div>
|
||||
</div>
|
||||
<a-tabs default-active-key="1" class="ant-tabs">
|
||||
<a-tabs style="margin-top: 20px" default-active-key="1" class="ant-tabs">
|
||||
<a-tab-pane key="1" :tab="$t('DeliverableStatus')">
|
||||
<div class="box-content">
|
||||
<div class="box-content-left">
|
||||
@@ -171,7 +123,7 @@
|
||||
</a-tabs>
|
||||
<listOfRelevantPersonnel ref="listOfRelevantPersonnelRef"/>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<settingList :url="url" ref="settingListRef"/>
|
||||
<settingList :url="url" ref="settingListRef" @settingListForm="settingListForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -196,8 +148,12 @@
|
||||
queryById: 'project/projectLibraryBase/queryById',
|
||||
add: 'project/projectLibraryBase/add',
|
||||
edit: 'project/projectLibraryBase/edit',
|
||||
queryByprojectId:'project/projectTaskPlanning/queryByprojectId',
|
||||
}
|
||||
queryByProjectId: 'project/projectTaskPlanning/queryByProjectId',
|
||||
addSettingUrl: 'project/projectTaskPlanning/add',
|
||||
editSettingUrl: 'project/projectTaskPlanning/edit',
|
||||
settingQueryForm: '/project/projectTaskPlanning/list'
|
||||
},
|
||||
regulatoryCertificationTaskPlanList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -215,15 +171,18 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
getSetting(){
|
||||
getAction(this.url.queryByprojectId, { id: this.$route.query.id }).then((res) => {
|
||||
getSetting() {
|
||||
getAction(this.url.queryByProjectId, { projectId: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
this.regulatoryCertificationTaskPlanList = res.result || []
|
||||
} else {
|
||||
|
||||
this.regulatoryCertificationTaskPlanList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
settingListForm() {
|
||||
this.getSetting()
|
||||
},
|
||||
mainEcharts() {
|
||||
var myChart = echarts.init(document.getElementById('main'))
|
||||
myChart.setOption({
|
||||
@@ -258,9 +217,9 @@
|
||||
addModelList() {
|
||||
this.getForm()
|
||||
},
|
||||
settingClick(){
|
||||
this.$refs.settingListRef.edit()
|
||||
},
|
||||
settingClick() {
|
||||
this.$refs.settingListRef.edit()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -315,7 +274,6 @@
|
||||
|
||||
.process-content {
|
||||
margin-top: 4px;
|
||||
height: 60px;
|
||||
position: relative;
|
||||
|
||||
.process-content-content {
|
||||
@@ -335,13 +293,14 @@
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
max-width: 94px;
|
||||
max-width: 155px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.process-content-right-button {
|
||||
max-width: 155px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #6F7385;
|
||||
@@ -360,7 +319,7 @@
|
||||
}
|
||||
|
||||
.process-content-right-xian {
|
||||
height: 1px;
|
||||
height: 2px;
|
||||
width: calc(100% - 27px);
|
||||
background: #E6E6E9;
|
||||
position: absolute;
|
||||
@@ -395,8 +354,13 @@
|
||||
|
||||
.process-content-right-top {
|
||||
max-width: 70px !important;
|
||||
white-space: inherit !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.process-content-right-button {
|
||||
max-width: 70px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.text-field-right-color {
|
||||
|
||||
@@ -53,12 +53,17 @@
|
||||
>
|
||||
</a-table>
|
||||
</div>
|
||||
<certificationDirectory :url="url" ref="certificationDirectoryRef"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import certificationDirectory from './certificationDirectory'
|
||||
export default {
|
||||
name: 'TaskList',
|
||||
components:{
|
||||
certificationDirectory
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
columns: [
|
||||
@@ -191,7 +196,7 @@
|
||||
|
||||
},
|
||||
CertificationDirectory() {
|
||||
|
||||
this.$refs.certificationDirectoryRef.addModel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList" :accept="'.zip'"/>
|
||||
</div>
|
||||
<div @click="handleDel" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
@@ -145,6 +145,9 @@
|
||||
},
|
||||
handleDel(){
|
||||
|
||||
},
|
||||
getPersonnelList(){
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-drawer
|
||||
:title="$t('CertificationDirectory')"
|
||||
:maskClosable="false"
|
||||
:width="1000"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<div style="margin-bottom: 60px">
|
||||
<div class="table-operator">
|
||||
<div class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('add')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:scroll="{x: 800}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:loading="loading">
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text" @click="edit(record)">
|
||||
{{ $t('edit') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@change="onChange"
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'certificationDirectory',
|
||||
components: {},
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('directoryName'),
|
||||
dataIndex: 'directoryName',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('batch'),
|
||||
dataIndex: 'batch',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadTime'),
|
||||
dataIndex: 'uploadTime',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('enclosure'),
|
||||
dataIndex: 'enclosure',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.replacePage()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.replacePage()
|
||||
},
|
||||
onChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.replacePage()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.replacePage()
|
||||
},
|
||||
replacePage() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.addModelList, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
this.visible = false
|
||||
},
|
||||
edit() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
text-align: right;
|
||||
left: 0;
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
.table-operator{
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div style="float: right;margin-top: 1px" v-if="isDisplay">
|
||||
<div class="operator-text" v-has="'document:importZip'">
|
||||
<ImportFile :url="url"/>
|
||||
<ImportFile :url="url" :isTrue="true" :accept="'.xls'" @getList="getPersonnelList"/>
|
||||
</div>
|
||||
<div @click="handleModule" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
@@ -519,7 +519,7 @@ export default {
|
||||
text: this.$t('correspondingStandard')
|
||||
},
|
||||
{
|
||||
type: 'date',
|
||||
type: '',
|
||||
value: 'implementType',
|
||||
text: this.$t('implementationCategory'),
|
||||
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||
@@ -701,6 +701,9 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getPersonnelList(){
|
||||
this.getList()
|
||||
},
|
||||
initiateListConfirmationcClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{$t('export')}}
|
||||
</div>
|
||||
<div class="operator-text">
|
||||
<ImportFile :url="url" :isTrue="true" @getList="getPersonnelList"/>
|
||||
<ImportFile :url="url" :isTrue="true" :accept="'.xls'" @getList="getPersonnelList"/>
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
@@ -245,7 +245,8 @@
|
||||
url: {
|
||||
list: '/project/projectRelatedPersonnel/list',
|
||||
edit: '/project/projectRelatedPersonnel/edit',
|
||||
exportData: '/project/projectRelatedPersonnel/exportXls'
|
||||
exportData: '/project/projectRelatedPersonnel/exportXls',
|
||||
importZipUrl:'/project/projectRelatedPersonnel/importExcel',
|
||||
},
|
||||
selectedRowKeys: []
|
||||
}
|
||||
@@ -331,8 +332,8 @@
|
||||
handleExport() {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let query = {
|
||||
ids: selectedRowKeys.join(','),
|
||||
projectId: this.$route.query.id
|
||||
id: selectedRowKeys.join(','),
|
||||
// projectId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$t('ListOfRelevantPersonnel') + '.xls', query, this.Deselect)
|
||||
},
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { getAction, postAction, putAction } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
@@ -153,26 +153,40 @@
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
edit() {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.ids = data || []
|
||||
this.formInline = {}
|
||||
this.settingQueryForm()
|
||||
},
|
||||
settingQueryForm() {
|
||||
getAction(this.url.settingQueryForm, { projectId: this.$route.query.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = res.result || {}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...this.formInline
|
||||
...this.formInline,
|
||||
projectId: this.$route.query.id
|
||||
}
|
||||
let url = ''
|
||||
let Action
|
||||
if (this.formInline.id) {
|
||||
url = this.url.editSettingUrl
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.addSettingUrl
|
||||
Action = postAction
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
this.$emit('settingListForm')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
@@ -183,12 +197,6 @@
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user