权限相关优化修改

master
anthonywj 2 years ago
parent 29c55b0221
commit 200bae5efe

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -1,68 +1,78 @@
<template>
<!-- 本企业资质页面 -->
<div>
<div slot="header" style="font-weight: bold">
<div slot="header" style="font-weight: bold;margin-top: 35px">
<div style="text-align: center">
<img
alt="element-logo"
style="width: 10%"
style="width: 8%"
src="../assets/logo/logo.png"
/>
</div>
<h3 style="text-align: center;font-size: larger ;color:#707070 ">协调平台注册</h3>
<h3 style="text-align: center;font-size: larger ;color:#707070 ">UDI协调平台企业信息登记</h3>
</div>
<el-form
:model="inputQuery"
:rules="rules"
style="margin-top: 35px"
ref="inputQuery"
label-width="500px"
label-width="150px"
>
<el-card class="el-card">
<div>
<span>
企业信息
</span>
</div>
<div style=" margin-left: 40%">
<span>
本企业信息审核状态
<el-tag :type="inputQuery.ucstatus | statusFilterType" >
{{checkSupFlag[inputQuery.ucstatus] }}
</el-tag>
</span>
<div slot="header" class="clearfix">
<span>企业信息:</span>
<div>
<div style="float: right;margin-top: -20px ">
<el-button
type="primary"
size="mini"
icon="search"
@click="onModifySubmit()"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
>草稿保存
</el-button>
<el-button
type="primary"
size="mini"
icon="search"
@click="onModifySubmit('key')"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
>提交审核
</el-button>
</div>
</div>
</div>
<el-row
:gutter="20"
class="el-row"
type="flex"
>
<el-col :span="20" class="el-col">
<div style="float: right; margin-top: -20px">
<el-button
type="primary"
size="mini"
icon="search"
@click="onModifySubmit()"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
>草稿保存
</el-button>
<el-form-item
label="本企业信息审核状态:"
prop="reason"
>
<span>
<el-tag :type="inputQuery.ucstatus | statusFilterType">
{{ checkSupFlag[inputQuery.ucstatus] }}
</el-tag>
</span>
</el-form-item>
<el-button
type="primary"
size="mini"
icon="search"
@click="onModifySubmit('key')"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
>提交审核
</el-button>
</div>
</el-col>
</el-row>
<el-row
:gutter="20"
class="el-row"
type="flex"
style="margin-top: 25px"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label=" 说明:"
label-width="150px"
label="审核说明:"
prop="reason"
>
<el-input
@ -80,15 +90,15 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label=" 企业名称:"
label-width="150px"
prop="companyName"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.companyName"
></el-input>
@ -104,16 +114,15 @@
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label=" 社会信用号:"
label-width="150px"
prop="creditNum"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.creditNum"
></el-input>
@ -124,11 +133,11 @@
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-form-item label="企业类型:" label-width="150px" prop="bussinessStatus">
<el-col :span="20" class="el-col">
<el-form-item label="企业类型:" prop="bussinessStatus">
<el-select
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.bussinessStatus"
placeholder="企业类型"
style="width: 100%"
@ -149,16 +158,16 @@
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label=" 法人名称 :"
label-width="150px"
prop="legalPerson"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.legalPerson"
></el-input>
@ -171,15 +180,15 @@
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="法人身份证号 :"
label-width="150px"
prop="legalIdCard"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.legalIdCard"
></el-input>
@ -189,30 +198,29 @@
</el-row>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="注册地址:"
label-width="150px"
prop="registerAddress"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.registerAddress"
></el-input>
</el-form-item>
<el-form-item
label="注册地址:"
</el-col>
prop="registerAddress"
>
<el-input
size="small"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.registerAddress"
></el-input>
</el-form-item>
</el-col>
</el-row>
<!--<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 0px">-->
<!-- <el-col :span="10" class="el-col">-->
<!-- <el-form-item label="备注:" label-width="150px" prop="remark">-->
<!-- <el-col :span="20" class="el-col">-->
<!-- <el-form-item label="备注:" prop="remark">-->
<!-- <el-input-->
<!-- size="small"-->
<!-- v-model="inputQuery.remark"-->
@ -224,9 +232,11 @@
</el-card>
<el-card class="el-card">
<div>
<div slot="header" class="clearfix">
<span>
个人基本信息
企业系统负责人信息
</span>
</div>
<el-row
@ -235,12 +245,12 @@
type="flex"
style="margin-top: 25px"
>
<el-col :span="10" class="el-col">
<el-form-item label="注册手机:" label-width="150px" prop="mobile">
<el-col :span="20" class="el-col">
<el-form-item label="注册手机:" prop="mobile">
<el-input
size="small"
placeholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.mobile"
></el-input>
</el-form-item>
@ -251,12 +261,12 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-form-item label="注册人名称:" label-width="150px" prop="realName">
<el-col :span="20" class="el-col">
<el-form-item label="注册人名称:" prop="realName">
<el-input
size="small"
placeholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.realName"
></el-input>
</el-form-item>
@ -268,12 +278,12 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-form-item label="法人联系电话:" label-width="150px" prop="fmobile">
<el-col :span="20" class="el-col">
<el-form-item label="法人联系电话:" prop="fmobile">
<el-input
size="small"
placeholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.fmobile"
></el-input>
</el-form-item>
@ -285,12 +295,12 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-form-item label="邮箱:" label-width="150px" prop="email">
<el-col :span="20" class="el-col">
<el-form-item label="邮箱:" prop="email">
<el-input
size="small"
placeholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.email"
></el-input>
</el-form-item>
@ -298,23 +308,21 @@
</el-row>
<el-row
:gutter="20"
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="系统负责人姓名:"
label-width="150px"
prop="name"
>
<el-input
size="small"
splaceholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.name"
></el-input>
</el-form-item>
@ -326,16 +334,16 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="系统负责人电话:"
label-width="150px"
prop="tel"
>
<el-input
size="small"
splaceholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.tel"
></el-input>
</el-form-item>
@ -346,15 +354,15 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="系统负责人QQ:"
label-width="150px"
prop="qq"
>
<el-input
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
splaceholder="请输入内容"
v-model="inputQuery.qq"
></el-input>
@ -367,16 +375,16 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="系统负责人微信:"
label-width="150px"
prop="weChat"
>
<el-input
size="small"
splaceholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.weChat"
></el-input>
</el-form-item>
@ -388,16 +396,16 @@
class="el-row"
type="flex"
>
<el-col :span="10" class="el-col">
<el-col :span="20" class="el-col">
<el-form-item
label="系统负责人邮箱:"
label-width="150px"
prop="xemail"
>
<el-input
size="small"
splaceholder="请输入内容"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
v-model="inputQuery.xemail"
></el-input>
</el-form-item>
@ -408,12 +416,6 @@
</el-card>
<el-card>
<div style="float: right; text-align: right; margin-bottom: 8px">
<el-button
@ -421,7 +423,7 @@
size="mini"
icon="search"
@click="addCert()"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
style="text-align: right"
>添加资质证书
</el-button>
@ -446,7 +448,7 @@
<el-table-column label="确认状态" prop="checkStatus" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.checkStatus | statusFilterType">
{{ checkFlag[scope.row.checkStatus]}}
{{ checkFlag[scope.row.checkStatus] }}
</el-tag>
</template>
</el-table-column>
@ -458,7 +460,7 @@
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">
{{ statusFlag[scope.row.status]}}
{{ statusFlag[scope.row.status] }}
</el-tag>
</template>
@ -471,22 +473,25 @@
<el-button
type="text"
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
@click.native="addCert(scope.row)"
>编辑</el-button
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native="showImgViewer(scope.row)"
>预览</el-button
>预览
</el-button
>
<el-button
type="text"
size="small"
:disabled ="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
:disabled="inputQuery.ucstatus == 1 || inputQuery.ucstatus ==3"
@click.native="deleteCompanyCert(scope.row)"
>删除</el-button
>删除
</el-button
>
</template>
</el-table-column>
@ -529,37 +534,29 @@
/>
</el-form>
</div>
</template>
<script>
import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
import {insertInitial,saveAllInfo} from "@/api/auth/registComPer";
import {filterCompanyCert,deleteCert,updateCert} from "@/api/sup/userCert";
import { previewImage } from "@/api/purchase/supCompany";
import {insertInitial, saveAllInfo} from "@/api/auth/registComPer";
import {filterCompanyCert, deleteCert, updateCert} from "@/api/sup/userCert";
import {previewImage} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import {isBlank} from "@/utils/strUtil";
import {encrypts} from "@/api/login";
export default {
name: "supCompanyEdit",
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
inputQuery: {
ucstatus:0,
formData:{},
ucstatus: 0,
formData: {},
},
headers: {},
imgViewerVisible: false,
@ -567,15 +564,15 @@ export default {
fromOptions: [],
classesDisplay: false,
corpLoading: false,
mobile:"",
mobile: "",
selectedOptions: [],
query:{
query: {
page: 1,
limit: 20,
},
upId:"",
urId:"",
ucId:"",
upId: "",
urId: "",
ucId: "",
rules: {
companyName: [
{
@ -758,114 +755,117 @@ export default {
created() {
this.yz();
// this.getInfo();
// this.getInfo();
},
components: { companyAddCert,ElImageViewer
components: {
companyAddCert, ElImageViewer
},
methods: {
onModifySubmit(val){
let mess ="";
if(this.$isNotBlank(val)){
mess='审核提交';
}else{
mess='草稿保存'
onModifySubmit(val) {
let mess = "";
if (this.$isNotBlank(val)) {
mess = '审核提交';
} else {
mess = '草稿保存'
}
this.$confirm("是否"+mess, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=>{
this.inputQuery.upId=this.upId;
this.inputQuery.urId=this.urId;
this.inputQuery.ucId=this.ucId;
this.inputQuery.list=this.certList;
if(this.$isNotBlank(val)){
this.inputQuery.key=val;
}
saveAllInfo(this.inputQuery)
.then((res)=>{
if(res.code = 20000){
this.$message.success("提交成功");
this.getInfo();
}else{
this.$message.error(res.message);
}
})
})
this.$refs["inputQuery"].validate((valid) => {
if (valid) {
this.$confirm("是否" + mess, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.inputQuery.upId = this.upId;
this.inputQuery.urId = this.urId;
this.inputQuery.ucId = this.ucId;
this.inputQuery.list = this.certList;
if (this.$isNotBlank(val)) {
this.inputQuery.key = val;
}
saveAllInfo(this.inputQuery)
.then((res) => {
if (res.code = 20000) {
this.$message.success("提交成功");
this.getInfo();
} else {
this.$message.error(res.message);
}
})
})
}
});
},
deleteCompanyCert(row){
deleteCompanyCert(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=>{
}).then(() => {
this.certLoading = true;
let tquery = {
id: row.id,
filePath: row.filePath,
};
deleteCert(tquery).then((res)=>{
deleteCert(tquery).then((res) => {
this.certLoading = false;
if (res.code === 20000) {
this.$message({
type: "success",
message: "删除成功!",
});
this. getCert();
}else{
this.getCert();
} else {
this.$message.error(res.message);
}
}).catch(()=>{
}).catch(() => {
this.certLoading = false;
})
}).catch(()=>{
}).catch(() => {
})
},
yz(){
yz() {
var phoneReg = /^[1][3,4,5,7,8][0-9]{9}$/;
let param={
mobile:this.$route.query.mobile,
captcha:this.$route.query.captcha,
let param = {
mobile: this.$route.query.mobile,
captcha: this.$route.query.captcha,
}
encrypts(param).then((res)=>{
if(res.code == 20000){
if(phoneReg.test(res.data.mobile) && res.data.captcha.length == 6) {
encrypts(param).then((res) => {
if (res.code == 20000) {
if (phoneReg.test(res.data.mobile) && res.data.captcha.length == 6) {
this.mobile = res.data.mobile;
this.inputQuery.mobile = res.data.mobile;
this.getInfo();
}
}else{
this.$router.push({path:"/404"})
} else {
this.$router.push({path: "/404"})
}
})
},
getInfo(){
let param ={
mobile :this.mobile
getInfo() {
let param = {
mobile: this.mobile
}
insertInitial(param)
.then((res)=>{
if(!isBlank(res.data['registComPerResponse'])){
this.inputQuery =res.data['registComPerResponse'];
.then((res) => {
if (!isBlank(res.data['registComPerResponse'])) {
this.inputQuery = res.data['registComPerResponse'];
// this.upId=res.data['registComPerResponse'].upId;
this.urId=res.data['registComPerResponse'].id;
this.ucId=res.data['registComPerResponse'].ucId;
}else{
this.urId = res.data['registComPerResponse'].id;
this.ucId = res.data['registComPerResponse'].ucId;
} else {
// this.upId=res.data['upId'];
this.urId=res.data['urId'];
this.ucId=res.data['ucId'];
this.urId = res.data['urId'];
this.ucId = res.data['ucId'];
}
this.getCert();
})
@ -873,28 +873,28 @@ export default {
},
getCert(){
this.query.businessId=this.ucId;
filterCompanyCert( this.query)
.then((res)=>{
if(res.code == 20000){
this.certList= res.data.list || [];
getCert() {
this.query.businessId = this.ucId;
filterCompanyCert(this.query)
.then((res) => {
if (res.code == 20000) {
this.certList = res.data.list || [];
this.certTotal = res.data.total;
}
})
},
certHandleCurrentChange(val){
certHandleCurrentChange(val) {
this.query.page = val.page;
this.getCert();
},
addCert(row){
addCert(row) {
if (this.$isNotBlank(row)) {
this.formName = 2;
this.inputQuery.formData = row;
this.editTye = 2;
}else{
} else {
this.formName = 1;
this.inputQuery.formData = {};
this.editTye = 1;
@ -909,7 +909,7 @@ export default {
this.addCertVisible = false;
},
showImgViewer(row){
showImgViewer(row) {
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name=";
@ -976,9 +976,8 @@ export default {
}
.el-card {
margin: 15px 25%;
width: 50%;
margin: 15px 20%;
width: 60%;
/*transition: all .5s;*/
}

@ -3,15 +3,15 @@
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="接口名称:">
<el-input v-model="filterQuery.name" placeholder="接口名称"
<el-col :span="8">
<el-form-item class="query-form-item" label="接口分类名称:">
<el-input v-model="filterQuery.name" placeholder="接口分类名称"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item class="query-form-item" label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
@ -28,7 +28,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="8">
<el-form-item class="query-form-item" label="更新时间:">
<el-date-picker
:picker-options="pickerOptions"
@ -72,18 +72,13 @@
border
@current-change="handleSelectionChange">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="接口分类名称" prop="name" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip>
<el-table-column label="接口分类名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="创建时间" prop="createTime" show-overflow-tooltip>
</el-table-column>
<el-table-column label="更新时间" prop="updateTime" width="140" show-overflow-tooltip>
<el-table-column label="更新时间" prop="updateTime" show-overflow-tooltip>
</el-table-column>
<el-table-column label="备注" prop="reemark" width="140" show-overflow-tooltip>
<el-table-column label="备注" prop="reemark" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -123,6 +118,7 @@
<el-tabs type="border-card" style="margin: 15px">
<!--单据业务详情-->
<el-tab-pane>
<span slot="label"> {{ currentRow == null ? '' : currentRow.name }}</span>
<el-form :inline="true" :model="bizQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="接口名称:">
<el-input
@ -156,46 +152,47 @@
<el-table-column
label="接口名称"
prop="name"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="接口地址"
width="150"
prop="path"
></el-table-column>
<el-table-column
label="权限标识"
width="100"
prop="perms"
></el-table-column>
<el-table-column
label="接口文档"
prop="docUrl"
width="100"
>
<template slot-scope="scope">
<el-link v-if="scope.row.docUrl != '' && scope.row.docUrl != null" type="primary" :href="scope.row.docUrl" target="_blank"></el-link>
<el-link v-if="scope.row.docUrl != '' && scope.row.docUrl != null" type="primary" :href="scope.row.docUrl"
target="_blank">文档链接
</el-link>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
width="100"
></el-table-column>
<el-table-column
label="更新时间"
prop="updateTime"
width="100"
></el-table-column>
<el-table-column
label="备注"
prop="remark"
width="100"
></el-table-column>
></el-table-column>
<el-table-column label="操作" width="160" fixed="right">
@ -245,13 +242,13 @@
>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="接口名称" prop="name" class="query-form-item">
<el-input
v-model="subData.name"
style="width: 80%"
auto-complete="off"
placeholder="请输入接口名称"
></el-input>
<el-form-item label="接口名称" prop="name" class="query-form-item">
<el-input
v-model="subData.name"
style="width: 80%"
auto-complete="off"
placeholder="请输入接口名称"
></el-input>
</el-form-item>
</el-col>
@ -327,7 +324,6 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
@ -342,8 +338,7 @@
</template>
<script>
import { getSortList,insertLicense,deleteLicense,updateLicense } from "@/api/system/sysicense";
import {getSortList, insertLicense, deleteLicense, updateLicense} from "@/api/system/sysicense";
const formJson = {
@ -357,11 +352,12 @@ export default {
name: "IoSupSearchOrder",
data() {
return {
check:{},
check: {},
subData: {},
formName: null,
subFormVisible: false,
showSearch: true,
currentRow: null,
filterQuery: {
name: "",
page: 1,
@ -369,7 +365,7 @@ export default {
startTime: null,
endTime: null,
startAduditTime: null,
endAduditTime:null,
endAduditTime: null,
},
invList: [],
@ -459,7 +455,7 @@ export default {
},
components: {},
methods: {
onReset(){
onReset() {
this.$router.push({
path: "",
});
@ -470,8 +466,8 @@ export default {
startTime: null,
endTime: null,
startAduditTime: null,
endAduditTime:null,
parentId:0,
endAduditTime: null,
parentId: 0,
};
this.actDateRange = [];
@ -479,9 +475,9 @@ export default {
this.getList();
},
onBizReset(){
onBizReset() {
this.bizQuery = {
parentId: this.bizQuery.parentId,
parentId: this.bizQuery.parentId,
name: null,
page: 1,
limit: 10
@ -490,18 +486,16 @@ export default {
},
onBizSubmit(){
onBizSubmit() {
this.bizQuery.page = 1;
this.getlower();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmit(){
onSubmit() {
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
@ -524,7 +518,7 @@ export default {
//
getList() {
this.loading = true;
this.filterQuery.parentId=0;
this.filterQuery.parentId = 0;
getSortList(this.filterQuery)
.then((response) => {
this.loading = false;
@ -542,17 +536,18 @@ export default {
this.total = 0;
});
},
handleSelectionChange(val){
this.bizQuery.page=1;
this.bizQuery.parentId=val.id;
handleSelectionChange(val) {
this.bizQuery.page = 1;
this.bizQuery.parentId = val.id;
this.currentRow = val;
this.getlower();
},
getlower(){
this.bizDetailLoading=true;
getSortList(this.bizQuery).then((res)=>{
this.bizDetailLoading=false;
if(res.code == 20000){
getlower() {
this.bizDetailLoading = true;
getSortList(this.bizQuery).then((res) => {
this.bizDetailLoading = false;
if (res.code == 20000) {
this.bizDetailList = res.data.list || [];
this.bizTotal = res.data.total || 0;
} else {
@ -560,7 +555,7 @@ export default {
this.bizDetailList = [];
this.bizTotal = 0;
}
}).catch((error)=>{
}).catch((error) => {
this.bizDetailLoading = false;
this.$message.error(error.message);
this.bizDetailList = [];
@ -569,106 +564,104 @@ export default {
})
},
rollback(row,val){
rollback(row, val) {
this.$confirm("此操作将删除该接口信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=>{
let param={
parentId:row.parentId,
id:row.id
}).then(() => {
let param = {
parentId: row.parentId,
id: row.id
}
deleteLicense(param).then((res)=>{
if(res.code == 20000){
this.$message.success("删除成功!");
if(val == 1){
this.getlower();
}
this.getList();
}else{
deleteLicense(param).then((res) => {
if (res.code == 20000) {
this.$message.success("删除成功!");
if (val == 1) {
this.getlower();
}
this.getList();
} else {
this.$message.error(res.message);
}
})
}).catch(()=>{
}).catch(() => {
})
},
upload(row,formName){
upload(row, formName) {
this.formName = formName;
this.check=row;
this.subData=row;
this.subFormVisible=true;
this.check = row;
this.subData = row;
this.subFormVisible = true;
},
reviewOrder(row,formName){
reviewOrder(row, formName) {
this.formName = formName;
this.check=row;
this.subData=row;
this.subFormVisible=true;
this.check = row;
this.subData = row;
this.subFormVisible = true;
},
printOrder(row,formName){
printOrder(row, formName) {
this.formName = formName;
this.check=row;
this.subData={};
this.subFormVisible=true;
this.check = row;
this.subData = {};
this.subFormVisible = true;
},
add(data,formName){
this.subFormVisible=true;
this.subData={};
add(data, formName) {
this.subFormVisible = true;
this.subData = {};
this.formName = formName;
this.check=data;
this.check = data;
},
hideForm(){
this.subFormVisible=false;
hideForm() {
this.subFormVisible = false;
},
forInvSubmit(){
if(this.formName === "add" && this.check == null){
forInvSubmit() {
if (this.formName === "add" && this.check == null) {
//
this.subData.parentId=0;
this.subData.parentId = 0;
insertLicense(this.subData)
.then((res)=>{
if(res.code == 20000){
.then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功!")
this.subFormVisible=false;
this.subFormVisible = false;
this.getList();
}
})
}else if(this.formName === "add" && this.check != null){
} else if (this.formName === "add" && this.check != null) {
//
this.subData.parentId=this.check.id;
this.subData.parentId = this.check.id;
insertLicense(this.subData)
.then((res)=>{
if(res.code == 20000){
.then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功!")
this.subFormVisible=false;
this.subFormVisible = false;
this.getList();
}
})
}else if(this.formName === "edit" && this.check.parentId == 0){
//
updateLicense(this.subData).then((res)=>{
if(res.code == 20000){
this.$message.success("修改成功!")
this.subFormVisible=false;
this.getList();
}
} else if (this.formName === "edit" && this.check.parentId == 0) {
//
updateLicense(this.subData).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!")
this.subFormVisible = false;
this.getList();
}
})
}else{
updateLicense(this.subData).then((res)=>{
if(res.code == 20000){
} else {
updateLicense(this.subData).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!")
this.subFormVisible=false;
this.subFormVisible = false;
this.getlower();
}
@ -677,19 +670,16 @@ export default {
}
},
},
filters: {},
mounted() {
},
created() {
this.getList();
this.getList();
},
};
</script>

@ -1,8 +1,8 @@
<template>
<div>
<el-card class="el-card">
<el-form :inline="true" :model="filterQuery" class="query-form" label-width="100px" size="mini">
<el-form-item class="query-form-item" label="角色名称:" prop="name">
<el-form :inline="true" :model="filterQuery" class="query-form" label-width="100px" size="mini">
<el-form-item class="query-form-item" label="角色名称:" prop="name">
<el-input
v-model="filterQuery.name"
clearable
@ -15,24 +15,27 @@
placeholder="请选择状态"
style="width: 90%"
>
<el-option label="全部" value="" />
<el-option label="启用" :value="0" />
<el-option label="禁用" :value="1" />
<el-option label="全部" value=""/>
<el-option label="启用" :value="0"/>
<el-option label="禁用" :value="1"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px; display: flex">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置</el-button
>重置
</el-button
>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
>查询</el-button
>查询
</el-button
>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleSubForm(null, 'add')"
>新增</el-button
>新增
</el-button
>
</el-button-group>
</el-form-item>
@ -42,20 +45,18 @@
border
@current-change="handleSelectionChange">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="角色名称" prop="name" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="角色名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="编码" prop="code" width="140" show-overflow-tooltip>
<el-table-column label="编码" prop="code" show-overflow-tooltip>
</el-table-column>
<el-table-column label="状态" prop="status" width="140" show-overflow-tooltip>
<el-table-column label="状态" prop="status" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip>
<el-table-column label="创建时间" prop="createTime" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -110,7 +111,7 @@
>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="角色名称" prop="name" class="query-form-item">
<el-form-item label="角色名称" prop="name" class="query-form-item">
<el-input
v-model="subData.name"
style="width: 80%"
@ -149,7 +150,6 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="hideForm">取消</el-button>
@ -160,8 +160,7 @@
</el-dialog>
<el-dialog title="授权" :visible.sync = "roleMenuDialog.visible">
<el-dialog title="授权" :visible.sync="roleMenuDialog.visible">
<el-tree
:data="roleMenuDialog.detail"
show-checkbox
@ -182,11 +181,10 @@
</template>
<script>
import {getRolelist, insertRole, updateRole, deleteRole, treeselect,saveRoleMenu}
import {getRolelist, insertRole, updateRole, deleteRole, treeselect, saveRoleMenu}
from "@/api/system/srole"
const formJson = {
site_id: "",
site_name: "",
@ -198,9 +196,9 @@ export default {
name: "IoSupSearchOrder",
data() {
return {
rId:"",
visible:false,
check:{},
rId: "",
visible: false,
check: {},
subData: {},
formName: null,
subFormVisible: false,
@ -210,18 +208,18 @@ export default {
limit: 10,
startTime: null,
endTime: null,
status:"",
status: "",
},
status: {
0: "正常",
1: "禁用",
},
roleMenuDialog:{
roleMenuDialog: {
visible: false,
detail:{},
roleId:0,
checkKeys:[],
detail: {},
roleId: 0,
checkKeys: [],
defaultProps: {
children: "children",
label: "name"
@ -283,7 +281,7 @@ export default {
},
components: {},
methods: {
onReset(){
onReset() {
this.$router.push({
path: "",
});
@ -293,7 +291,7 @@ export default {
limit: 10,
startTime: null,
endTime: null,
status:"",
status: "",
};
this.actDateRange = [];
this.auditDateRange = [];
@ -301,10 +299,7 @@ export default {
},
onSubmit(){
onSubmit() {
this.loading = true;
this.filterQuery.page = 1;
this.getList();
@ -330,88 +325,86 @@ export default {
});
},
hideForm(){
this.subFormVisible=false;
hideForm() {
this.subFormVisible = false;
this.getList();
},
reviewOrder(data,formName){
this.subFormVisible=true;
this.formName=formName;
this.subData=data;
reviewOrder(data, formName) {
this.subFormVisible = true;
this.formName = formName;
this.subData = data;
},
handleSubForm(data,formName){
this.formName=formName;
this.subData={};
this.subFormVisible=true;
handleSubForm(data, formName) {
this.formName = formName;
this.subData = {};
this.subFormVisible = true;
},
forInvSubmit(){
if(this.formName === "add"){
forInvSubmit() {
if (this.formName === "add") {
insertRole(this.subData)
.then((res) =>{
if(res.code == 20000){
.then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功!");
this.subFormVisible=false;
this.subFormVisible = false;
this.getList();
}
})
}else{
} else {
updateRole(this.subData)
.then((res) =>{
if(res.code == 20000){
.then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!");
this.subFormVisible=false;
this.subFormVisible = false;
this.getList();
}
})
}
},
rollback(row){
this.$confirm("此操作将删除角色,是否继续?","提示",{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(()=>{
this.subData=row;
deleteRole(this.subData)
.then((res)=>{
if(res.code == 20000){
this.$message.success("删除成功!");
this.getList();
}
})
rollback(row) {
this.$confirm("此操作将删除角色,是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.subData = row;
deleteRole(this.subData)
.then((res) => {
if (res.code == 20000) {
this.$message.success("删除成功!");
this.getList();
}
})
})
})
},
printOrder(id){
this.rId=id;
let param={
roleId:id
printOrder(id) {
this.rId = id;
let param = {
roleId: id
}
treeselect(param).then((res)=>{
treeselect(param).then((res) => {
this.roleMenuDialog.detail = res.data.data.menuTrees;
this.roleMenuDialog.checkKeys = res.data.data.roleMenuIds;
this.roleMenuDialog.visible=true;
this.roleMenuDialog.visible = true;
})
},
saveRoleMenu(){
let param={
saveRoleMenu() {
let param = {
roleId: this.rId,
menuIds:this.getMenuAllCheckedKeys()
menuIds: this.getMenuAllCheckedKeys()
}
saveRoleMenu(param).then((res)=>{
if(res.code == 20000){
saveRoleMenu(param).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!");
this.roleMenuDialog.visible = false;
this.getList();
@ -443,7 +436,7 @@ export default {
},
created() {
this.getList();
this.getList();
},
};
</script>

Loading…
Cancel
Save