Merge branch 'dev-yjl' into 'shenzhen-dev'

演示平台新增(标准七参数版)

See merge request !110
This commit is contained in:
袁晶琳 2023-03-01 09:47:24 +08:00
commit b49d182c7f
4 changed files with 886 additions and 681 deletions

View File

@ -18,7 +18,7 @@ var PROJECT = {
}
var PROJECT_TYPE = PROJECT.online_zjsj
var PROJECT_TYPE = PROJECT.local_test
var headerShow = true; // 是否显示头部
var tabsShow = true; // 是否显示tabs

View File

@ -46,8 +46,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地
// axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
// axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/
// axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上
// axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,12 @@
<template>
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm">
<el-form
:inline="true"
size="medium"
:model="searchForm"
ref="searchForm"
>
<el-form-item label="审核状态" prop="useState">
<el-select v-model="searchForm.useState" placeholder="请选择">
<el-option label="全部" value=""></el-option>
@ -10,7 +15,11 @@
</el-select>
</el-form-item>
<el-form-item label="企业名称" prop="companyName" class="last">
<el-input v-model="searchForm.companyName" placeholder="请输入" clearable></el-input>
<el-input
v-model="searchForm.companyName"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="getListData">查询</el-button>
@ -20,25 +29,53 @@
</div>
<div class="table_wrap whiteBlock">
<el-table class="tables" :data="tableData">
<el-table-column type="index" width="50" align="center" label="序号"></el-table-column>
<el-table-column prop="companyName" label="企业名称" align="center" width="180"></el-table-column>
<el-table-column prop="createTime" label="注册时间" align="center" width="180"></el-table-column>
<el-table-column prop="companyTel" label="手机号码" align="center" width="180"></el-table-column>
<el-table-column
type="index"
width="50"
align="center"
label="序号"
></el-table-column>
<el-table-column
prop="companyName"
label="企业名称"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="createTime"
label="注册时间"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="companyTel"
label="手机号码"
align="center"
width="180"
></el-table-column>
<el-table-column prop="isEnable" label="使用状态" align="center">
<template slot-scope="scope">
{{scope.row.isEnable==0?'禁用':'启用'}}
{{ scope.row.isEnable == 0 ? '禁用' : '启用' }}
</template>
</el-table-column>
<el-table-column prop="diffDay" label="剩余天数" align="center"></el-table-column>
<el-table-column
prop="diffDay"
label="剩余天数"
align="center"
></el-table-column>
<el-table-column prop="diffDay" label="项目数" align="center">
<template slot-scope="scope">
{{scope.row.createProjectNum}}/{{scope.row.projectNum}}
{{ scope.row.createProjectNum }}/{{ scope.row.projectNum }}
</template>
</el-table-column>
<el-table-column prop="address" label="操作" align="center">
<template slot-scope="scope">
<div @click="configuration(scope.row)" class="operationText">
<img src="@/assets/images/accredit.png" width="15px" height="15px" />
<img
src="@/assets/images/accredit.png"
width="15px"
height="15px"
/>
<span>授权配置</span>
</div>
</template>
@ -56,91 +93,122 @@
background
></el-pagination>
</div>
<el-dialog :modal-append-to-body="false" title="授权配置" :visible.sync="authorizedDialog" width="767px">
<el-dialog
:modal-append-to-body="false"
title="授权配置"
:visible.sync="authorizedDialog"
width="767px"
>
<div class="dialog_content">
<el-row :gutter="24">
<el-col :span="11" style="margin:7px 0px 0 0;">
<el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">授权状态</span>
<el-radio-group v-model="isEnable" size="medium">
<el-radio :label="1">启用</el-radio>
<el-radio :label="0">禁用</el-radio>
</el-radio-group>
</el-col>
<el-col :span="13" style="text-align:right">
<span style="margin-right:15px">到期日期</span>
<el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">到期日期</span>
<el-date-picker
v-model="time"
type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" size="medium">
placeholder="选择日期"
value-format="yyyy-MM-dd"
size="medium"
>
</el-date-picker>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;">
<el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否显示未解锁模块</span>
<el-radio-group v-model="moduleShowType" size="medium">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
<el-col :span="13" style="text-align:right">
<span style="margin-right:15px">授权项目数</span>
<el-input-number v-model="projectNum" :min="1" size="medium" style="width: 220px"></el-input-number>
<el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">授权项目数</span>
<el-input-number
v-model="projectNum"
:min="1"
size="medium"
style="width: 220px"
></el-input-number>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;">
<el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否显示企业大屏</span>
<el-radio-group v-model="companyBigScreen" size="medium">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
<el-col :span="13" style="text-align:right">
<span style="margin-right:15px">是否显示项目看板</span>
<el-radio-group v-model="projectKanban" size="medium" style="width: 220px;text-align:left">
<el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否显示项目看板</span>
<el-radio-group
v-model="projectKanban"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;">
<el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否启用人员录入二维码</span>
<el-radio-group v-model="inputQrCode" size="medium">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
<el-col :span="13" style="text-align:right">
<span style="margin-right:15px">是否启用移动考勤</span>
<el-radio-group v-model="mobileAttendance" size="medium" style="width: 220px;text-align:left">
<el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否启用移动考勤</span>
<el-radio-group
v-model="mobileAttendance"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="16" style="margin:7px 0px 0 0;">
<!-- 此处注释是因为添加了一个菜单版本 20220706 -->
<el-col :span="16" style="margin: 7px 0px 0 0; width: 100%">
<!-- 此处注释是因为添加了一个菜单版本 20220706 -->
<!-- <span class="firstConlumLabel">是否启用精益建造</span>
<el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList">
<el-radio :label="2"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group> -->
<span class="firstConlumLabel">选择系统版本</span>
<el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList">
<el-radio-group
v-model="styleType"
size="medium"
@change="getBaseModuleList"
>
<el-radio :label="1">标准版</el-radio>
<el-radio :label="2">星璇版</el-radio>
<el-radio :label="3">衢州版</el-radio>
<el-radio :label="4">三江版</el-radio>
<el-radio :label="4">标准七参数版</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="16" style="margin:7px 0px 0 0;">
<el-col :span="16" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">客服电话</span>
<el-input v-model="customerServicePhone" size="medium" placeholder="请输入" style="display: inline-block; width: 200px;"></el-input>
<el-input
v-model="customerServicePhone"
size="medium"
placeholder="请输入"
style="display: inline-block; width: 200px"
></el-input>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px">
@ -151,9 +219,13 @@
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-col>
<el-col :span="13" style="text-align:right">
<span style="margin-right:15px">是否能添加项目</span>
<el-radio-group v-model="canAddProject" size="medium" style="width: 220px;text-align:left">
<el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否能添加项目</span>
<el-radio-group
v-model="canAddProject"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
@ -162,49 +234,89 @@
<el-row :gutter="24" style="margin-top: 20px">
<el-col :span="24">
<div>请勾选功能权限</div>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group class="zdy-checkbox" v-model="moduleInfo.moduleId" @change="handleCheckedCitiesChange">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选</el-checkbox
>
<el-checkbox-group
class="zdy-checkbox"
v-model="moduleInfo.moduleId"
@change="handleCheckedCitiesChange"
>
<div class="CheckboxTitle">企业模块</div>
<el-checkbox v-if="i.moduleType===1" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox>
<el-checkbox
v-if="i.moduleType === 1"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">企业后台模块</div>
<el-checkbox v-if="i.moduleType===3" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox>
<el-checkbox
v-if="i.moduleType === 3"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目模块</div>
<el-checkbox v-if="i.moduleType===2" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox>
<el-checkbox
v-if="i.moduleType === 2"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目看板模块</div>
<el-checkbox v-if="i.moduleType===4" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox>
<el-checkbox
v-if="i.moduleType === 4"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
</el-checkbox-group>
</el-col>
</el-row>
<div class="dialog-footer">
<el-button class="cancleBtn"
<el-button
class="cancleBtn"
@click="authorizedDialog = false"
icon="el-icon-circle-close"
size="medium"
> </el-button>
> </el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="saveFn"
size="medium"
> </el-button>
> </el-button
>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { getRegisterAuditList,editCompanyConfigApi,baseModuleList,getCompanyModuleList,baseModuleProjectEdit } from "@/assets/js/api/jxjadmin.js";
import {
getRegisterAuditList,
editCompanyConfigApi,
baseModuleList,
getCompanyModuleList,
baseModuleProjectEdit
} from '@/assets/js/api/jxjadmin.js'
export default {
name: "registerAudit",
name: 'registerAudit',
data() {
return {
checkAll: false,
isIndeterminate: false,
cityOptions: [],
moduleInfo:{moduleId:''},
companyArr:[],
moduleInfo: { moduleId: '' },
companyArr: [],
count: 0,
props: {
multiple: true
@ -214,8 +326,8 @@ export default {
children: 'zones'
},*/
searchForm: {
companyName: "",
useState: "",
companyName: '',
useState: ''
},
total: 0,
pageNo: 1,
@ -225,146 +337,157 @@ export default {
checkList: [],
authorizedDialog: false,
isEnable: 0,
time: "",
detail:{},
time: '',
detail: {},
projectNum: 1,
moduleShowType:0,
"companyBigScreen": 0,
"inputQrCode": 0,
"projectKanban": 0,
"mobileAttendance": 0,
customerServicePhone:'',
styleType:1,
canGoProjectEnd:0,
canAddProject:0
};
moduleShowType: 0,
companyBigScreen: 0,
inputQrCode: 0,
projectKanban: 0,
mobileAttendance: 0,
customerServicePhone: '',
styleType: 1,
canGoProjectEnd: 0,
canAddProject: 0
}
},
created() {
this.getListData();
this.getListData()
},
methods: {
saveFn(){
if(this.time==''){
saveFn() {
if (this.time == '') {
this.$message.error('请选择授权时长!')
}else{
} else {
var json = {
"clientId": this.detail.clientId,
"clientSecret": this.detail.clientSecret,
"companySn": this.detail.companySn,
clientId: this.detail.clientId,
clientSecret: this.detail.clientSecret,
companySn: this.detail.companySn,
// "effectiveTime": 0,
"expireTime": this.time,
"headquartersSn": this.detail.headquartersSn,
"isEnable": this.isEnable,
projectNum:this.projectNum,
moduleShowType:this.moduleShowType,
mobileAttendance:this.mobileAttendance,
companyBigScreen:this.companyBigScreen,
inputQrCode:this.inputQrCode,
projectKanban:this.projectKanban,
customerServicePhone:this.customerServicePhone,
styleType:this.styleType,
enterProjectBackType:this.canGoProjectEnd,
addProjectType:this.canAddProject
expireTime: this.time,
headquartersSn: this.detail.headquartersSn,
isEnable: this.isEnable,
projectNum: this.projectNum,
moduleShowType: this.moduleShowType,
mobileAttendance: this.mobileAttendance,
companyBigScreen: this.companyBigScreen,
inputQrCode: this.inputQrCode,
projectKanban: this.projectKanban,
customerServicePhone: this.customerServicePhone,
styleType: this.styleType,
enterProjectBackType: this.canGoProjectEnd,
addProjectType: this.canAddProject
}
editCompanyConfigApi(json).then(res=>{
let moduleIdStr=JSON.parse(JSON.stringify(this.moduleInfo)).moduleId.join(',');
console.log('查看form',moduleIdStr,this.moduleInfo);
baseModuleProjectEdit({headquartersSn:this.moduleInfo.headquartersSn,moduleIdStr:moduleIdStr,sn:this.moduleInfo.companySn,type:'1'}).then(res=>{
editCompanyConfigApi(json).then((res) => {
let moduleIdStr = JSON.parse(
JSON.stringify(this.moduleInfo)
).moduleId.join(',')
console.log('查看form', moduleIdStr, this.moduleInfo)
baseModuleProjectEdit({
headquartersSn: this.moduleInfo.headquartersSn,
moduleIdStr: moduleIdStr,
sn: this.moduleInfo.companySn,
type: '1'
}).then((res) => {
// this.$message.success('')
})
this.authorizedDialog=false;
this.getListData();
this.authorizedDialog = false
this.getListData()
this.$message.success('配置成功!')
})
}
},
//
getListData() {
let data = this.searchForm;
data.pageNo = this.pageNo;
data.pageSize = this.pageSize;
let data = this.searchForm
data.pageNo = this.pageNo
data.pageSize = this.pageSize
getRegisterAuditList(data).then((res) => {
console.log(res);
this.tableData=res.result.records
this.total=res.result.total
});
console.log(res)
this.tableData = res.result.records
this.total = res.result.total
})
},
resetForm() {
this.$refs['searchForm'].resetFields();
this.getListData();
this.$refs['searchForm'].resetFields()
this.getListData()
},
// --
configuration(item) {
console.log('打印',item);
item.moduleId=[];
this.moduleInfo=JSON.parse(JSON.stringify(item));
this.getCompanyList(item.headquartersSn);
this.authorizedDialog = true;
console.log('打印', item)
item.moduleId = []
this.moduleInfo = JSON.parse(JSON.stringify(item))
this.getCompanyList(item.headquartersSn)
this.authorizedDialog = true
this.time = item.expireTime
this.isEnable = item.isEnable
this.detail=item
this.detail = item
this.projectNum = item.projectNum
this.projectKanban = item.projectKanban
this.companyBigScreen = item.companyBigScreen
this.mobileAttendance = item.mobileAttendance
this.inputQrCode = item.inputQrCode
this.styleType=item.styleType
this.styleType = item.styleType
this.canGoProjectEnd=item.enterProjectBackType
this.canAddProject=item.addProjectType
this.getBaseModuleList();
this.canGoProjectEnd = item.enterProjectBackType
this.canAddProject = item.addProjectType
this.getBaseModuleList()
},
//
handleSizeChange(val) {
this.pageSize = val;
this.getListData();
this.pageSize = val
this.getListData()
},
//
handleCurrentChange(val) {
this.pageNo = val;
this.getListData();
this.pageNo = val
this.getListData()
},
getBaseModuleList(){
baseModuleList({moduleType:'',styleType:this.styleType}).then(result => {
if (result.success) {
let brHtm={};
this.companyArr=result.result;
this.companyArr.map(item =>{
this.cityOptions.push(item.moduleId);
})
this.brHtm=brHtm;
// console.log('',brHtm)
// console.log('',this.companyArr)
getBaseModuleList() {
baseModuleList({ moduleType: '', styleType: this.styleType }).then(
(result) => {
if (result.success) {
let brHtm = {}
this.companyArr = result.result
this.companyArr.map((item) => {
this.cityOptions.push(item.moduleId)
})
this.brHtm = brHtm
// console.log('',brHtm)
// console.log('',this.companyArr)
}
}
})
)
},
getCompanyList(headquartersSn){
getCompanyModuleList({headquartersSn:headquartersSn}).then(result => {
if (result.success) {
result.result.map(item =>{
this.moduleInfo.moduleId.push(item.moduleId);
})
// console.log('',result.result)
this.handleCheckedCitiesChange(this.moduleInfo.moduleId);
getCompanyList(headquartersSn) {
getCompanyModuleList({ headquartersSn: headquartersSn }).then(
(result) => {
if (result.success) {
result.result.map((item) => {
this.moduleInfo.moduleId.push(item.moduleId)
})
// console.log('',result.result)
this.handleCheckedCitiesChange(this.moduleInfo.moduleId)
}
}
})
)
},
handleCheckAllChange(val) {
this.moduleInfo.moduleId = val ? this.cityOptions : [];
this.isIndeterminate = false;
this.moduleInfo.moduleId = val ? this.cityOptions : []
this.isIndeterminate = false
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cityOptions.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length;
let checkedCount = value.length
this.checkAll = checkedCount === this.cityOptions.length
this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cityOptions.length
}
}
};
}
</script>
<style lang="less" scoped>
.dialogTable {
@ -392,19 +515,19 @@ export default {
width: 46%;
margin: 10px 0;
}
.zdy-checkbox{
.zdy-checkbox {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
>label{
> label {
width: 30%;
}
}
.CheckboxTitle{
.CheckboxTitle {
font-size: 14px;
width: 100%;
}
.firstConlumLabel{
}
.firstConlumLabel {
width: 160px;
// margin-right: 15px;
display: inline-block;