Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -144,3 +144,10 @@ export const enableUser =
|
||||
return request(
|
||||
{url: '/api/jobslink-api/system/tuser/on', method: 'post', params: {ids, authType: 2}})
|
||||
}
|
||||
|
||||
|
||||
export const removeMainList = (data) => request({
|
||||
url: '/api/jobslink-api/tenant/company/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
:option="option"
|
||||
:data="inviteCodeList"
|
||||
:page.sync="page"
|
||||
@row-del="rowDel"
|
||||
@search-change="searchChange"
|
||||
@refresh-change="refreshChange"
|
||||
@search-reset="searchReset"
|
||||
@@ -16,11 +17,15 @@
|
||||
<template slot="menuLeft">
|
||||
<el-button
|
||||
size="small"
|
||||
@click.stop="distributionCodeDialog = true"
|
||||
@click.stop="distributionCodeDialog = true; isEdit = false; inviteCodeForm = {}"
|
||||
type="primary"
|
||||
v-show="vaildData(permission.manage_station_inviteCode_edituser, false)"
|
||||
>新增用户</el-button>
|
||||
</template>
|
||||
<template slot="menu" slot-scope="{row}">
|
||||
<el-button type="text" @click="rowUpdate(row)">编辑</el-button>
|
||||
<el-button type="text" @click="rowDel(row)">删除</el-button>
|
||||
</template>
|
||||
<template slot="isEnabled" slot-scope="{ row }">
|
||||
<el-switch
|
||||
:value="row.isEnabled"
|
||||
@@ -49,10 +54,10 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定用户:" prop="realName" >
|
||||
<el-form-item label="绑定用户:" v-show="!isEdit" prop="realName" >
|
||||
<el-input style="width: 260px" v-model="inviteCodeForm.realName" placeholder="请输入姓名" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证:" prop="idNumber" >
|
||||
<el-form-item label="身份证:" v-show="!isEdit" prop="idNumber" >
|
||||
<el-input style="width: 260px" v-model="inviteCodeForm.idNumber" placeholder="请输入身份证" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号:" prop="phone" >
|
||||
@@ -72,6 +77,7 @@
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { check18IdCardNo, isExcel, isMobile } from "@/util/validate";
|
||||
import { deepClone } from "@/util/util";
|
||||
import {
|
||||
getEnterpriseList,
|
||||
saveEnterpriseItem,
|
||||
@@ -100,7 +106,6 @@ const curdOptions = {
|
||||
delBtn: false,
|
||||
height: "auto",
|
||||
border: true,
|
||||
menu:false,
|
||||
searchMenuSpan: 48,
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
@@ -125,15 +130,15 @@ const curdOptions = {
|
||||
prop: 'idNumber',
|
||||
search: true,
|
||||
formatter:(_,value,label) => value
|
||||
},{
|
||||
label: '备注',
|
||||
prop: 'remarks',
|
||||
},{
|
||||
label: '启用状态',
|
||||
prop: 'isEnabled',
|
||||
slot: true,
|
||||
width: 100
|
||||
},{
|
||||
label: '备注',
|
||||
prop: 'remarks',
|
||||
},]
|
||||
}]
|
||||
}
|
||||
const page = {
|
||||
pageSize: 10,
|
||||
@@ -152,6 +157,7 @@ export default {
|
||||
option: Object.assign({}, curdOptions),
|
||||
page: Object.assign({}, page),
|
||||
searchData: {},
|
||||
isEdit: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -161,6 +167,43 @@ export default {
|
||||
...mapGetters(["permission"]),
|
||||
},
|
||||
methods:{
|
||||
rowUpdate(row) {
|
||||
this.isEdit = true
|
||||
this.distributionCodeDialog = true
|
||||
this.inviteCodeForm = deepClone({
|
||||
inviteCompanyId: row.inviteCompanyId,
|
||||
phone: row.phone,
|
||||
remarks: row.remarks,
|
||||
id: row.id
|
||||
})
|
||||
},
|
||||
rowDel(row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此消息吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
return getInvitationStatusUpdate({ id: row.id, isDeleted: 1});
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
async onLoad() {
|
||||
this.getInvitationCode()
|
||||
},
|
||||
@@ -214,12 +257,17 @@ export default {
|
||||
})
|
||||
},
|
||||
async inviteCodeSubmit() {
|
||||
const companyName = this.enterpriseList.filter((item) => item.id === this.inviteCodeForm.inviteCompanyId)[0].companyName;
|
||||
const companyName = this.enterpriseList.filter((item) => item.id === this.inviteCodeForm.inviteCompanyId)[0].comname;
|
||||
let params = {
|
||||
...this.inviteCodeForm,
|
||||
companyName
|
||||
}
|
||||
let resData = await saveEnterpriseItem(params)
|
||||
let resData = null
|
||||
if( this.isEdit ) {
|
||||
resData = await getInvitationStatusUpdate(params)
|
||||
} else {
|
||||
resData = await saveEnterpriseItem(params)
|
||||
}
|
||||
if(resData.data.code === 200){
|
||||
const { code, data } = resData.data
|
||||
this.distributionCodeDialog = false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<basic-container>
|
||||
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
|
||||
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
|
||||
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
|
||||
@row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
|
||||
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
|
||||
<!-- <template slot="menu" slot-scope="{row}">-->
|
||||
<!-- <el-button-->
|
||||
@@ -37,7 +37,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { companyInfoAdd, companyStationInfo, companyDetail, companyUpdate, stationStop } from "@/api/manage/main";
|
||||
import { companyInfoAdd, companyStationInfo, companyDetail, companyUpdate, stationStop, removeMainList } from "@/api/manage/main";
|
||||
// import { getStationDic } from "@/api/manage/station";
|
||||
import { mapGetters } from "vuex";
|
||||
import { isMobile, check18IdCardNo, validatenull } from "@/util/validate";
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
index: true,
|
||||
indexLabel: "序号",
|
||||
viewBtn: true,
|
||||
delBtn: false,
|
||||
delBtn: true,
|
||||
menuWidth: 250,
|
||||
labelWidth: 151,
|
||||
dialogClickModal: false,
|
||||
@@ -428,6 +428,33 @@ export default {
|
||||
initData() {
|
||||
this.onLoad(this.page, this.query);
|
||||
},
|
||||
rowDel(row) {
|
||||
const h = this.$createElement;
|
||||
this.$confirm(
|
||||
h("div", null, [
|
||||
h("p", { style: "font-size: 16px" }, "您确定要删除此消息吗? "),
|
||||
h("p", { style: "color: red" }, "一旦删除则无法找回"),
|
||||
]),
|
||||
{
|
||||
type: "warning",
|
||||
showClose: false,
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
return removeMainList({ id: row.id, isDeleted: 1});
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "操作成功!",
|
||||
});
|
||||
this.refreshChange();
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
rowSave(row, done, loading) {
|
||||
console.log('rowSave')
|
||||
row.authUrlId = getPath(row.authUrlId)
|
||||
|
||||
@@ -1495,7 +1495,7 @@ export default {
|
||||
// 匹配政策
|
||||
matchPolicy(row) {
|
||||
console.log('匹配政策')
|
||||
getMatchPolicy({id: row.id, serveId: this.selectInfo.id}).then(res => {
|
||||
getMatchPolicy({id: row.id, serveId: this.selectInfo.id, serveUserId: row.serveUserId}).then(res => {
|
||||
let _this = this;
|
||||
const {records, current, size, total} = res.data.data
|
||||
_this.policyData = records
|
||||
|
||||
Reference in New Issue
Block a user