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