[update 功能安全中心] 列表、成员单位部分接口对接
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||
*/
|
||||
import {filterObj} from '@/utils/util'
|
||||
import {getAction, downloadFile, getFileAccessHttpUrl, postAction} from '@/api/manage'
|
||||
import {getAction, downloadFile, getFileAccessHttpUrl, postAction, httpAction} from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import {ACCESS_TOKEN, TENANT_ID} from '@/store/mutation-types'
|
||||
import store from '@/store'
|
||||
@@ -58,6 +58,8 @@ export const JeroListMixin = {
|
||||
superQueryParams: '',
|
||||
/** 高级查询拼接方式 */
|
||||
superQueryMatchType: 'and',
|
||||
// 新增的删除接口请求方式改成post,需要的模块设置成true
|
||||
postMethodDel: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -193,7 +195,9 @@ export const JeroListMixin = {
|
||||
content: '是否删除选中数据?',
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
getAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
||||
// 新增加的删除接口用post方式请求
|
||||
const method = that.postMethodDel ? 'POST' : 'GET'
|
||||
httpAction(that.url.deleteBatch, {ids: ids}, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
||||
@@ -228,7 +232,9 @@ export const JeroListMixin = {
|
||||
title: '确认删除',
|
||||
content: '确定要删除此条数据吗?',
|
||||
onOk: function () {
|
||||
getAction(that.url.delete, {id: id}).then((res) => {
|
||||
// 新增加的删除接口用post方式请求
|
||||
const method = that.postMethodDel ? 'POST' : 'GET'
|
||||
httpAction(that.url.delete, {id: id}, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||
|
||||
@@ -99,6 +99,8 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
// 混入post请求删除接口
|
||||
postMethodDel: true,
|
||||
SafetyCenterProjectTypeEnums,
|
||||
IconDraftingGruop,
|
||||
labelCol: {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<a-row>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入成员单位" v-model="queryParam.companyName"
|
||||
<a-input placeholder="请输入成员单位" v-model="queryParam.companyId"
|
||||
:maxLength='50'></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -162,6 +162,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectTypeEnums,
|
||||
// 混入post请求删除接口
|
||||
postMethodDel: true,
|
||||
disableMixinCreated: true,
|
||||
projectName: '',
|
||||
projectId: '',
|
||||
@@ -184,7 +186,7 @@ export default {
|
||||
sm: { span: 10 }
|
||||
},
|
||||
url: {
|
||||
list: '/SafetyCenterSubitem/list',
|
||||
list: '/SafetyCenterSubitem/page',
|
||||
delete: '/SafetyCenterSubitem/delete',
|
||||
deleteBatch: '/SafetyCenterSubitem/deleteBatch',
|
||||
exportXlsUrl: '/SafetyCenterSubitem/exportXls',
|
||||
@@ -205,13 +207,13 @@ export default {
|
||||
title: '成员单位',
|
||||
align: 'center',
|
||||
// width: 280,
|
||||
dataIndex: 'chargeCompanyTemporaryName',
|
||||
dataIndex: 'companyId_dictText',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
// width: 280,
|
||||
dataIndex: 'contactsTemporaryNameOne',
|
||||
dataIndex: 'contactsId_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -118,10 +118,6 @@ export default {
|
||||
contactsRepeat: {
|
||||
rules: [{ required: false, validator: this.validateContact }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
receivableAmount: {
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
selectedCompany: null, // 当前选中的企业
|
||||
@@ -169,7 +165,7 @@ export default {
|
||||
// 回显
|
||||
record.chargeCompany = {
|
||||
id: record.companyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
companyName: record.companyId_dictText
|
||||
}
|
||||
// 回显选中的企业
|
||||
this.selectedCompany = record.chargeCompany
|
||||
|
||||
Reference in New Issue
Block a user