管理员账号界面:企业管理新增功能开发/新开发字典管理页面

This commit is contained in:
jxj_yjl 2023-08-09 17:43:01 +08:00
parent 158f2b9d08
commit ffc5be0375
16 changed files with 1300 additions and 64 deletions

View File

@ -1,4 +1,4 @@
// var COMPANY = ''; //通用 var COMPANY = ''; //通用
// var COMPANY='zhongjian'; //中建,和沃尔对接的插件版用这个企业 // var COMPANY='zhongjian'; //中建,和沃尔对接的插件版用这个企业
// var COMPANY='hezhan'; //合展-宿迁 // var COMPANY='hezhan'; //合展-宿迁
// var COMPANY='nanchang'; //南昌地铁、衢州 // var COMPANY='nanchang'; //南昌地铁、衢州
@ -14,7 +14,7 @@
// COMPANY = 'zjwj'//中建五局 // COMPANY = 'zjwj'//中建五局
// COMPANY = 'sccr'//四川成润 // COMPANY = 'sccr'//四川成润
// COMPANY = 'pssh'//坪山沙湖项目 // COMPANY = 'pssh'//坪山沙湖项目
COMPANY = 'jlw'//金林湾 // COMPANY = 'jlw'//金林湾
// COMPANY = 'shzj'//上海张江 // COMPANY = 'shzj'//上海张江

View File

@ -1,62 +1,95 @@
/** /**
* api接口统一管理 * api接口统一管理
*/ */
import {post,get} from '../http' import { post, get } from '../http'
export const editCompanyConfigApi = data => post('xmgl/companyConfig/edit', data); //修改企业配置信息 export const editCompanyConfigApi = (data) =>
export const getRegisterAuditList = data => post('xmgl/company/selectCompanyPage', data); //获取企业注册审核列表 post('xmgl/companyConfig/edit', data) //修改企业配置信息
export const getRegisterAuditList = (data) =>
post('xmgl/company/selectCompanyPage', data) //获取企业注册审核列表
export const baseModuleList = data => post('xmgl/baseModule/list', data); //列表查询所有模块信息 export const baseModuleList = (data) => post('xmgl/baseModule/list', data) //列表查询所有模块信息
export const getCompanyModuleList = data => post('xmgl/baseModule/getCompanyModuleList', data); //查询总企业默认的模块列表 export const getCompanyModuleList = (data) =>
export const baseModuleProjectEdit = data => post('xmgl/baseModuleProject/edit', data); //编辑模块-企业项目关联信息 post('xmgl/baseModule/getCompanyModuleList', data) //查询总企业默认的模块列表
export const getProjectModuleList = data => post('xmgl/baseModule/getProjectModuleList', data); //查询企业下项目默认的模块列表 export const baseModuleProjectEdit = (data) =>
post('xmgl/baseModuleProject/edit', data) //编辑模块-企业项目关联信息
export const getProjectModuleList = (data) =>
post('xmgl/baseModule/getProjectModuleList', data) //查询企业下项目默认的模块列表
export const getUserModuleList = (data) =>
post('xmgl/baseModule/getUserModuleList', data) //查询企业用户配置的模块列表
export const baseModuleUserEdit = (data) =>
post('xmgl/baseModuleUser/edit', data) //查询企业用户配置的模块列表
export const addHeadquarterCompanyApi = (data) =>
post('/xmgl/company/headquarterCompany/add', data)
export const editHeadquarterCompanyApi = (data) =>
post('/xmgl/company/headquarterCompany/update', data)
export const deleteHeadquarterCompanyApi = (data) =>
post('/xmgl/company/delete', data)
export const getUserModuleList = data => post('xmgl/baseModule/getUserModuleList', data); //查询企业用户配置的模块列表
export const baseModuleUserEdit = data => post('xmgl/baseModuleUser/edit', data); //查询企业用户配置的模块列表
/** /**
* 模块管理 * 模块管理
*/ */
export const addModuleApi = data => post('xmgl/baseModule/add', data); export const addModuleApi = (data) => post('xmgl/baseModule/add', data)
export const deleteModuleApi = data => post('xmgl/baseModule/delete', data); export const deleteModuleApi = (data) => post('xmgl/baseModule/delete', data)
export const editModuleApi = data => post('xmgl/baseModule/edit', data); export const editModuleApi = (data) => post('xmgl/baseModule/edit', data)
export const getAllModuleApi = data => post('xmgl/baseModule/list', data); export const getAllModuleApi = (data) => post('xmgl/baseModule/list', data)
/** /**
* 菜单管理 * 菜单管理
*/ */
export const addMenuApi = data => post('xmgl/baseMenu/add', data); export const addMenuApi = (data) => post('xmgl/baseMenu/add', data)
export const deleteMenuApi = data => post('xmgl/baseMenu/delete', data); export const deleteMenuApi = (data) => post('xmgl/baseMenu/delete', data)
export const editMenuApi = data => post('xmgl/baseMenu/edit', data); export const editMenuApi = (data) => post('xmgl/baseMenu/edit', data)
export const getAllMenuApi = data => post('xmgl/baseMenu/list', data); export const getAllMenuApi = (data) => post('xmgl/baseMenu/list', data)
export const getAllMenuByGroupApi = data => post('xmgl/baseMenu/selectGroupList', data); export const getAllMenuByGroupApi = (data) =>
post('xmgl/baseMenu/selectGroupList', data)
/** /**
* 按钮管理 * 按钮管理
*/ */
export const addBtnApi = data => post('xmgl/action/add', data); export const addBtnApi = (data) => post('xmgl/action/add', data)
export const deleteBtnApi = data => post('xmgl/action/delete', data); export const deleteBtnApi = (data) => post('xmgl/action/delete', data)
export const editBtnApi = data => post('xmgl/action/edit', data); export const editBtnApi = (data) => post('xmgl/action/edit', data)
export const getAllBtnApi = data => post('xmgl/action/getActionList', data); export const getAllBtnApi = (data) => post('xmgl/action/getActionList', data)
/** /**
* 系统安全校验码 * 系统安全校验码
*/ */
export const addSystemVerificationApi = data => post('xmgl/systemVerification/add', data); export const addSystemVerificationApi = (data) =>
export const getSystemVerificationApi = data => post('xmgl/systemVerification/queryById', data); post('xmgl/systemVerification/add', data)
export const getSystemVerificationApi = (data) =>
post('xmgl/systemVerification/queryById', data)
/** /**
* app版本管理 * app版本管理
*/ */
export const addappVersionApi = data => post('xmgl/appVersion/add', data); export const addappVersionApi = (data) => post('xmgl/appVersion/add', data)
export const deleteappVersionApi = data => post('xmgl/appVersion/delete', data); export const deleteappVersionApi = (data) =>
export const editappVersionApi = data => post('xmgl/appVersion/edit', data); post('xmgl/appVersion/delete', data)
export const getappVersionListApi = data => get('xmgl/appVersion/list', data); export const editappVersionApi = (data) => post('xmgl/appVersion/edit', data)
export const getappVersionListApi = (data) => get('xmgl/appVersion/list', data)
/** /**
* 系统设置 * 系统设置
*/ */
export const selectSystemLogoConfigApi = data => get('xmgl/systemLogoConfig/selectSystemLogoConfig', data); //查询系统logo配置信息 export const selectSystemLogoConfigApi = (data) =>
export const editSystemLogoConfigApi = data => post('xmgl/systemLogoConfig/editSystemLogoConfig', data); //编辑系统logo配置信息 get('xmgl/systemLogoConfig/selectSystemLogoConfig', data) //查询系统logo配置信息
export const editSystemLogoConfigApi = (data) =>
post('xmgl/systemLogoConfig/editSystemLogoConfig', data) //编辑系统logo配置信息
//字典管理
export const addDictionaryApi = (data) => post('/xmgl/dictionary/add', data)
export const editDictionaryApi = (data) => post('/xmgl/dictionary/edit', data)
export const getDictionaryPageApi = (data) => get('/xmgl/dictionary/page', data)
//字典管理-数据项
export const addDictionaryItemApi = (data) => post('/xmgl/dictionaryItem/add', data)
export const deleteDictionaryItemApi = (data) => post('/xmgl/dictionaryItem/delete', data)
export const editDictionaryItemApi = (data) => post('/xmgl/dictionaryItem/edit', data)
export const getDictionaryItemPageApi = (data) => get('/xmgl/dictionaryItem/list', data)
export const getDictionaryItemBackApi = (data) => post('/xmgl/dictionary/back', data)
export const deleteDictionaryItemBackApi = (data) => post('/xmgl/dictionary/deletePhysic', data)
export const batchDeleteDictionaryItemBackApi = (data) => post('/xmgl/dictionary/batch/delete', data)

View File

@ -69,7 +69,7 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://58.250.210.9:9090' //深汕线上 // axios.defaults.baseURL = 'http://58.250.210.9:9090' //深汕线上
// axios.defaults.baseURL = 'http://101.43.164.214:11111' //百色线上 // axios.defaults.baseURL = 'http://101.43.164.214:11111' //百色线上
// axios.defaults.baseURL = 'http://101.43.164.214:12345/'//内蒙古线上 // axios.defaults.baseURL = 'http://101.43.164.214:12345/'//内蒙古线上
axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新 // axios.defaults.baseURL = 'http://121.196.214.246/api/'//金林湾线上新
// axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址 // axios.defaults.baseURL = 'http://42.194.144.62:8088/'//中建四局线上(新)地址
// axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上 // axios.defaults.baseURL = 'http://101.43.164.214:12350'//中建五局线上
// axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上(1) // axios.defaults.baseURL = 'http://182.90.224.147:15551/'//港投(成润)项目线上(1)
@ -82,8 +82,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL ='http://61.145.163.135:12345/' //坪山沙湖 // axios.defaults.baseURL ='http://61.145.163.135:12345/' //坪山沙湖
// axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上 // axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江 // axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
// axios.defaults.baseURL ='http://101.43.164.214:45011' //上海优益 // axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益
// axios.defaults.baseURL ='http://192.168.34.221:30002' //郭圣雄本地 axios.defaults.baseURL ='http://192.168.34.221:30002/' //郭圣雄本地
} else if (process.env.NODE_ENV == 'debug') { } else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'https://www.ceshi.com' axios.defaults.baseURL = 'https://www.ceshi.com'
} else if (process.env.NODE_ENV == 'production') { } else if (process.env.NODE_ENV == 'production') {

View File

@ -101,10 +101,15 @@ if (COMPANY == 'xingxuan') {
path: '/operateManage', path: '/operateManage',
}, },
{ {
menuName: '塔吊模型管理', menuName: '字典管理',
id: 9298, id: 9298,
path: '/brand', path: '/dictionaryManaged'
}, },
{
menuName: '塔吊模型管理',
id: 9299,
path: '/brand'
}
] ]
switch (data.accountType) { switch (data.accountType) {
case 1: case 1:

View File

@ -75,11 +75,18 @@ const routes2 = [
name: 'operateManage', name: 'operateManage',
component: () => import('../views/jxjadmin/operateManage.vue'), component: () => import('../views/jxjadmin/operateManage.vue'),
}, },
//字典管理
{
path: '/dictionaryManaged',
name: 'dictionaryManaged',
component: () => import('../views/jxjadmin/dictionaryManaged.vue'),
},
{ {
path: '/brand', path: '/brand',
name: 'brand', name: 'brand',
component: () => import('../views/projectFront/towerCrane/brand.vue'), component: () => import('../views/projectFront/towerCrane/brand.vue'),
}, },
// 企业版 人员管理 // 企业版 人员管理
{ {
path: '/firm/peopleManage', path: '/firm/peopleManage',

View File

@ -105,10 +105,12 @@ export default new Vuex.Store({
// FILEURL: 'http://182.90.224.147:15551/image/',//四川成润(内部线上) // FILEURL: 'http://182.90.224.147:15551/image/',//四川成润(内部线上)
// UPLOADURL: 'http://118.121.198.147:23232/upload/image',//四川成润(正式) // UPLOADURL: 'http://118.121.198.147:23232/upload/image',//四川成润(正式)
// FILEURL: 'http://118.121.198.147:23232/image/',//四川成润(正式) // FILEURL: 'http://118.121.198.147:23232/image/',//四川成润(正式)
UPLOADURL: 'http://121.196.214.246/api/upload/image',//金林湾 // UPLOADURL: 'http://121.196.214.246/api/upload/image',//金林湾
FILEURL: 'http://121.196.214.246/api/image/',//金林湾 // FILEURL: 'http://121.196.214.246/api/image/',//金林湾
// UPLOADURL: 'http://192.168.34.221:30002/upload/image',//郭圣雄本地 UPLOADURL: 'http://192.168.34.221:30002/upload/image',//郭圣雄本地
// FILEURL: 'http://192.168.34.221:30002/image/',//郭圣雄本地 FILEURL: 'http://192.168.34.221:30002/image/',//郭圣雄本地
// UPLOADURL: 'http://101.43.164.214:45011/upload/image',//上海优益
// FILEURL: 'http://101.43.164.214:45011/image/',//上海优益
ACCOUNTTYPE: [ ACCOUNTTYPE: [
"系统管理员", "系统管理员",

View File

@ -604,10 +604,15 @@ export default {
path: '/operateManage' path: '/operateManage'
}, },
{ {
menuName: '塔吊模型管理', menuName: '字典管理',
id: 9298, id: 9298,
path: '/brand' path: '/dictionaryManaged'
} },
// {
// menuName: '',
// id: 9299,
// path: '/brand'
// }
] ]
switch (data.accountType) { switch (data.accountType) {
case 1: case 1:

View File

@ -0,0 +1,956 @@
<template>
<!-- 字典管理 -->
<div class="fullHeight">
<div class="searchBox whiteBlock">
<!-- 列表搜索栏 -->
<el-form
:inline="true"
ref="searchFormInput"
:model="searchFormInput"
size="medium"
>
<el-form-item label="字典名称">
<el-input
placeholder="请输入"
v-model="searchFormInput.dictionaryName"
></el-input>
</el-form-item>
<el-form-item label="字典编码">
<el-input
placeholder="请输入"
v-model="searchFormInput.dictionaryEncoding"
></el-input>
</el-form-item>
<el-button type="primary" size="medium" plain @click="getList"
>查询</el-button
>
<el-button type="warning" size="medium" plain @click="refresh(1)"
>刷新</el-button
>
<el-button type="primary" size="medium" @click="add">新增</el-button>
<el-button type="primary" size="medium" @click="exportBtn"
>导出</el-button
>
<el-upload
style="margin: 0px 15px; display: inline"
class="upload-demo expintBtn"
name="mppFile"
:on-success="handleImportSuccess"
:on-change="handleImportChange"
:before-upload="beforeUpload"
:file-list="fileList"
:action="$http.defaults.baseURL + 'xmgl/dictionary/importExcel'"
:data="{ projectSn: projectSn }"
:show-file-list="false"
:headers="headers"
>
<el-button size="medium" type="primary">导入</el-button>
</el-upload>
<el-button type="primary" size="medium" @click="recyclebinBtn"
>回收站</el-button
>
<el-button
type="primary"
plain
size="medium"
@click="deleteInBatches"
:disabled="multipleSelection.length == 0"
>批量移入回收站</el-button
>
</el-form>
</div>
<div class="table_wrap whiteBlock">
<el-table
class="tables"
:data="List"
height="800"
tooltip-effect="dark"
ref="multipleTable"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column
prop="dictionaryName"
align="left"
label="字典名称"
></el-table-column>
<el-table-column
prop="dictionaryEncoding"
label="字典编码"
align="center"
></el-table-column>
<el-table-column
prop="remarks"
label="描述"
align="center"
></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<div class="tableBtns">
<div class="operationText last" @click="previewDetail(scope.row)">
<i
class="el-icon-document"
style="color: #8dacfa; font-size: 16px; margin-right: 2px"
></i>
<span>字典配置</span>
</div>
<div @click="edit(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>编辑</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>移入回收站</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="searchForm.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="searchForm.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(pageTotal)"
></el-pagination>
</div>
<!-- 新增字典弹框 -->
<el-dialog
:modal-append-to-body="false"
@close="close"
:title="title"
:visible.sync="diaLogShow"
width="667px"
>
<div class="dialog_content">
<el-form
size="medium"
ref="addEditForm"
:model="addEditForm"
:rules="addEditRules"
label-width="120px"
class="dialogFormBox"
>
<el-form-item label="字典名称" prop="dictionaryName">
<el-input
v-model="addEditForm.dictionaryName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="字典编码" prop="dictionaryEncoding">
<el-input
v-model="addEditForm.dictionaryEncoding"
placeholder="请输入"
:disabled="title=='编辑字典'"
></el-input>
</el-form-item>
<el-form-item label="描述" prop="remarks">
<el-input
v-model="addEditForm.remarks"
placeholder="请输入"
></el-input>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="diaLogShow = false"
icon="el-icon-circle-close"
size="medium"
>取消
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="submit"
size="medium"
>保存
</el-button>
</div>
</el-form>
</div>
</el-dialog>
<!-- 字典数据项列表弹框-->
<el-dialog
title="数据项"
class="dialog-center"
:visible.sync="showDetail"
:modal-append-to-body="false"
@close="closeDetail"
>
<div class="dialog-content">
<div class="search-box">
<div class="search-item">
<span class="search-label" style="margin-right: 10px">名称</span>
<el-input v-model="dataSearch.name" placeholder="请输入"></el-input>
</div>
<div class="search-item">
<span class="search-label" style="margin-right: 10px">状态</span>
<el-select
v-model="dataSearch.isEnable"
clearable
placeholder="请选择"
>
<el-option
v-for="item in dataSelect"
:key="item.value"
:label="item.isEnable"
:value="item.value"
></el-option>
</el-select>
</div>
<el-button type="primary" plain @click="dataGetSearch"
>查询</el-button
>
<el-button type="warning" plain @click="refresh(2)">刷新</el-button>
<el-button type="primary" @click="addTestPoint">新增</el-button>
</div>
<el-table :data="surveyPointDetail" class="tables" height="560">
<el-table-column
prop="name"
label="名称"
align="center"
></el-table-column>
<el-table-column
prop="data"
label="数据值"
align="center"
></el-table-column>
<el-table-column
prop="remarks"
label="描述"
align="center"
></el-table-column>
<el-table-column
prop="orderNum"
label="排序"
align="center"
></el-table-column>
<el-table-column prop="isEnable" label="是否启用" align="center">
<template slot-scope="scope">{{
scope.row.isEnable == 1 ? '是' : '否'
}}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="170">
<template slot-scope="scope">
<div class="tableBtns">
<div class="operationText" @click="dataEdit(scope.row)">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>编辑</span>
</div>
<div class="operationText" @click="deleData(scope.row)">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>删除</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pager"
@size-change="handleSizeChangeData"
@current-change="handleCurrentChangeData"
:current-page="dataPage.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="dataPage.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(dataPage.total)"
background
></el-pagination>
</div>
</el-dialog>
<!-- 字典数据项新增弹框-->
<el-dialog
:modal-append-to-body="false"
@close="dataClose"
:title="dataTitle"
:visible.sync="dataDiaLogShow"
width="667px"
>
<div class="dialog_content">
<el-form
size="medium"
ref="dataAddEditForm"
:model="dataAddEditForm"
:rules="dataAddEditRules"
label-width="120px"
class="dialogFormBox"
>
<el-form-item label="名称" prop="name">
<el-input
v-model="dataAddEditForm.name"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="数据值" prop="data">
<el-input
v-model="dataAddEditForm.data"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="描述" prop="remarks">
<el-input
v-model="dataAddEditForm.remarks"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="排序" prop="orderNum">
<el-input-number
v-model="dataAddEditForm.orderNum"
:min="1"
:max="100"
label="描述文字"
></el-input-number>
</el-form-item>
<el-form-item label="是否启用">
<el-radio-group v-model="dataAddEditForm.isEnable">
<el-radio-button :label="1">启用</el-radio-button>
<el-radio-button :label="0">不启用</el-radio-button>
</el-radio-group>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="dataDiaLogShow = false"
icon="el-icon-circle-close"
size="medium"
>取消
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="dataSubmit"
size="medium"
>保存
</el-button>
</div>
</el-form>
</div>
</el-dialog>
<!-- 字典回收站弹框 -->
<el-dialog
title="字典回收站"
class="dialog-center"
:visible.sync="recyclebinShow"
:modal-append-to-body="false"
>
<div class="dialog-content">
<el-table :data="recyclebinList" class="tables" height="560">
<el-table-column
prop="dictionaryName"
label="字典名称"
align="center"
></el-table-column>
<el-table-column
prop="dictionaryEncoding"
label="字典编码"
align="center"
></el-table-column>
<el-table-column
prop="remarks"
label="描述"
align="center"
></el-table-column>
<el-table-column align="center" label="操作" width="200">
<template slot-scope="scope">
<div class="tableBtns">
<div class="operationText" @click="retrieveBtn(scope.row)">
<i
class="el-icon-refresh-left"
style="color: #5483f6; font-size: 18px"
></i>
<span>取回</span>
</div>
<div class="operationText" @click="deleCompletely(scope.row)">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>彻底删除</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
class="pagerBox"
@size-change="handleSizeChangeDataRetr"
@current-change="handleCurrentChangeDataRetr"
:current-page="retrieve.pageNo"
:page-sizes="$store.state.PAGESIZRS"
:page-size="retrieve.pageSize"
layout="total, sizes, prev, pager, next"
:total="Number(retrieve.total)"
background
></el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
import {
addDictionaryApi,
editDictionaryApi,
getDictionaryPageApi,
addDictionaryItemApi,//
deleteDictionaryItemApi,
editDictionaryItemApi,
getDictionaryItemPageApi,
getDictionaryItemBackApi,//
deleteDictionaryItemBackApi,//
batchDeleteDictionaryItemBackApi,//
} from "@/assets/js/api/jxjadmin";
import axios from 'axios'
export default {
mounted() {
this.getList()
this.projectSn = this.$store.state.projectSn
},
data() {
return {
searchFormInput: {
dictionaryName: '',
dictionaryEncoding: '',
},
addEditForm: {
dictionaryName: '',
dictionaryEncoding: '',
remarks: '',
},
diaLogShow: false,
pageTotal: 0,
searchForm: {
pageNo: 1,
pageSize: 10,
},
addEditRules: {
dictionaryName: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
dictionaryEncoding: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
},
List: [],
title: '',
multipleSelection: [],//
showDetail: false,
//
surveyPointDetail: [],
dataSelect: [
{
value: 0,
isEnable: '否'
},
{
value: 1,
isEnable: '是'
},
],
dataSearch: {
name: '',
isEnable: '',
},
dataDiaLogShow: false,
dataTitle: '',
dataAddEditForm: {
name: '',
data: '',
remarks: '',
orderNum: '',
isEnable: 1,
dictionaryId: '',
},
dataAddEditRules: {
name: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
data: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
},
dataPage: {
pageNo: 1,
pageSize: 10,
total: 0
},
retrieve: {
pageNo: 1,
pageSize: 10,
total: 0
},
recyclebinShow: false,
recyclebinList: [
],
projectSn: '',
fileList: [],
}
},
computed: {
headers() {
return { Authorization: this.$store.state.userInfo.token }
},
},
methods: {
//
recyclebinBtn() {
this.recyclebinShow = true
this.getRetrieveList()
},
//
handleImportSuccess(res) {
if (res.code == 200) {
this.$message.success(res.message);
this.getList()
} else {
this.$message.error(res.message);
}
console.log('导入', res)
},
// mpp
handleImportChange(file, fileList) {
console.log('=[====]')
},
beforeUpload(file) {
console.log('=========', file)
},
//
exportBtn() {
fetch(this.$http.defaults.baseURL + 'xmgl/dictionary/exportXls', {
headers: {
'Authorization': this.$store.state.userInfo.token
}
})
.then(response => {
//
if (!response.ok) {
throw new Error('导出失败');
}
return response.blob();
})
.then(blob => {
console.log('导出成功');
//
const url = window.URL.createObjectURL(blob);
// <a>
const link = document.createElement('a');
link.href = url;
link.download = '导出文件.xlsx'; //
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// URL
window.URL.revokeObjectURL(url);
//
// 使blob
})
.catch(error => {
//
console.error(error);
});
},
//
retrieveBtn(obj) {
getDictionaryItemBackApi({ id: obj.id }).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getRetrieveList()
this.getList()
}
})
},
//
deleCompletely(obj) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteDictionaryItemBackApi({ id: obj.id }).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getRetrieveList()
}
})
})
.catch(() => { })
},
//
deleteInBatches() {
this.$confirm("此操作将数据移入回收站, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let data = this.multipleSelection
batchDeleteDictionaryItemBackApi(data).then((res) => {
if (res.code == 200) {
this.$message.success(res.message)
this.multipleSelection = []
this.getList()
}
})
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
})
},
//
getRetrieveList() {
//
getDictionaryPageApi({
projectSn: this.$store.state.projectSn,
pageSize: this.retrieve.pageSize,
pageNo: this.retrieve.pageNo,
deleted: 1,
}).then((result) => {
console.log('查询数据项列表', result);
if (result.success) {
this.recyclebinList = result.result.records
this.retrieve.total = result.result.total
}
})
},
//
dataGetList(val) {
getDictionaryItemPageApi({
projectSn: this.$store.state.projectSn,
pageSize: this.dataPage.pageSize,
pageNo: this.dataPage.pageNo,
dictionaryId: val,
name: this.dataSearch.name,
isEnable: this.dataSearch.isEnable,
}).then((result) => {
console.log('查询数据项列表', result);
if (result.success) {
this.surveyPointDetail = result.result.records
this.dataPage.total = result.result.total
}
})
},
//
addTestPoint() {
this.dataDiaLogShow = true
this.dataTitle = '新增'
},
dataEdit(obj) {
this.dataDiaLogShow = true
this.dataTitle = '编辑'
this.dataAddEditForm = JSON.parse(JSON.stringify(obj))
},
dataSubmit() {
let params = JSON.parse(JSON.stringify(this.dataAddEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.dataAddEditForm.validate((valid) => {
if (valid) {
if (this.dataTitle == '新增') {
addDictionaryItemApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.dataGetList(params.dictionaryId)
this.dataAddEditForm.dictionaryId = params.dictionaryId
}
})
} else if (this.dataTitle == '编辑') {
editDictionaryItemApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.dataGetList(params.dictionaryId)
this.dataAddEditForm.dictionaryId = params.dictionaryId
}
})
}
this.dataDiaLogShow = false
} else {
return false
}
})
},
//
dataGetSearch() {
this.dataGetList(this.dataAddEditForm.dictionaryId)
},
//
previewDetail(val) {
this.showDetail = true
this.dataAddEditForm.dictionaryId = val.id
this.dataGetList(val.id)
},
//
deleData(obj) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteDictionaryItemApi({ id: obj.id }).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.dataGetList(this.dataAddEditForm.dictionaryId)
// //
// if (this.surveyPointDetail.length === 0 && this.dataPage.pageNo > 1) {
// this.dataPage.pageNo--; //
// }
}
})
})
.catch(() => { })
},
//
handleSelectionChange(val) {
this.multipleSelection = val.map(item => item.id);
console.log('批量选中的数据', this.multipleSelection);
},
//
getList() {
getDictionaryPageApi({
projectSn: this.$store.state.projectSn,
pageSize: this.searchForm.pageSize,
pageNo: this.searchForm.pageNo,
dictionaryName: this.searchFormInput.dictionaryName,
dictionaryEncoding: this.searchFormInput.dictionaryEncoding,
deleted: 0,
}).then((result) => {
if (result.success) {
this.List = result.result.records
this.pageTotal = result.result.total
console.log('run', this.List)
}
})
},
add() {
this.diaLogShow = true
this.title = '新增字典'
},
edit(obj) {
this.diaLogShow = true
this.addEditForm = JSON.parse(JSON.stringify(obj))
this.title = '编辑字典'
},
//
deleteDev(obj) {
axios({
method: 'post',
url: `/xmgl/dictionary/delete?id=${obj.id} `,
}).then(res => {
this.getList()
});
},
submit() {
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.title == '新增字典') {
addDictionaryApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
} else if (this.title == '编辑字典') {
console.log('编辑信息', this.addEditForm)
editDictionaryApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getList()
}
})
}
this.diaLogShow = false
} else {
return false
}
})
},
refresh(type) {
if (type == 1) {
this.searchFormInput = {}
this.getList()
} else {
this.dataSearch = {}
this.dataGetList(this.dataAddEditForm.dictionaryId)
}
},
close() {
this.addEditForm = {}
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate()
})
},
closeDetail() {
this.showDetail = false
this.dataAddEditForm.dictionaryId = ''
},
dataClose() {
this.dataAddEditForm = {
name: '',
data: '',
remarks: '',
orderNum: '',
isEnable: 1,
},
this.$nextTick(() => {
this.$refs.dataAddEditForm.clearValidate()
})
},
handleSizeChange(val) {
this.searchForm.pageSize = val
this.getList()
},
handleCurrentChange(val) {
this.searchForm.pageNo = val
this.getList()
},
handleSizeChangeData(val) {
this.dataPage.pageSize = val
this.dataGetList(this.dataAddEditForm.dictionaryId)
},
handleCurrentChangeData(val) {
this.dataPage.pageNo = val
this.dataGetList(this.dataAddEditForm.dictionaryId)
},
handleSizeChangeDataRetr(val) {
this.retrieve.pageSize = val
this.getRetrieveList()
},
handleCurrentChangeDataRetr(val) {
this.retrieve.pageNo = val
this.getRetrieveList()
},
}
}
</script>
<style lang="less">
.tables {
img {
cursor: pointer;
}
}
.tableBtns {
display: flex;
justify-content: center;
}
.yj-dialogFormBox {
width: 462px;
}
.dialog-content {
height: 650px;
margin-bottom: 30px;
}
.search-box {
display: flex;
align-items: center;
margin-bottom: 20px;
.search-item {
display: flex;
align-items: center;
padding: 20px;
.search-label {
// width: 80px;
white-space: nowrap;
}
}
}
.dialog-center {
overflow: auto;
/deep/.el-dialog {
margin: 0 !important;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.pager {
margin-top: 5px;
text-align: center;
.el-pager li.active {
background-color: @--bg-color-primary !important;
}
button:disabled,
.btn-next,
.btn-prev {
background-color: transparent !important;
}
}
</style>

View File

@ -7,7 +7,7 @@
:model="searchForm" :model="searchForm"
ref="searchForm" ref="searchForm"
> >
<el-form-item label="审核状态" prop="useState"> <el-form-item label="使用状态" prop="useState">
<el-select v-model="searchForm.useState" placeholder="请选择"> <el-select v-model="searchForm.useState" placeholder="请选择">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="启用" :value="1"></el-option> <el-option label="启用" :value="1"></el-option>
@ -24,6 +24,9 @@
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="getListData">查询</el-button> <el-button type="primary" plain @click="getListData">查询</el-button>
<el-button type="warning" plain @click="resetForm">刷新</el-button> <el-button type="warning" plain @click="resetForm">刷新</el-button>
<el-button type="primary" size="medium" @click="addReg"
>添加企业</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -41,6 +44,18 @@
align="center" align="center"
width="180" width="180"
></el-table-column> ></el-table-column>
<el-table-column
prop="account"
label="用户账号"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="showPassword"
label="用户密码"
align="center"
width="180"
></el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="注册时间" label="注册时间"
@ -68,15 +83,33 @@
{{ scope.row.createProjectNum }}/{{ scope.row.projectNum }} {{ scope.row.createProjectNum }}/{{ scope.row.projectNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="操作" align="center"> <el-table-column prop="address" label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div @click="configuration(scope.row)" class="operationText"> <div class="tableBtns">
<img <div @click="configuration(scope.row)" class="operationText">
src="@/assets/images/accredit.png" <img
width="15px" src="@/assets/images/accredit.png"
height="15px" width="15px"
/> height="15px"
<span>授权配置</span> />
<span>授权配置</span>
</div>
<div @click="edit(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>编辑</span>
</div>
<div @click="deleteDev(scope.row)" class="operationText">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>删除</span>
</div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -298,6 +331,69 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 新增企业弹框 -->
<el-dialog
:modal-append-to-body="false"
@close="close"
:title="titleRes"
:visible.sync="diaLogShow"
width="667px"
>
<div class="dialog_content">
<el-form
size="medium"
ref="addEditForm"
:model="addEditForm"
:rules="addEditRules"
label-width="120px"
class="dialogFormBox"
>
<el-form-item label="企业名称" prop="companyName">
<el-input
v-model="addEditForm.companyName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="用户账号" prop="account">
<el-input
v-model="addEditForm.account"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="用户密码" prop="showPassword">
<el-input
type="password"
show-password
v-model="addEditForm.showPassword"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="手机号码" prop="companyTel">
<el-input
v-model="addEditForm.companyTel"
placeholder="请输入"
></el-input>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="diaLogShow = false"
icon="el-icon-circle-close"
size="medium"
>取消
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="submit"
size="medium"
>确定
</el-button>
</div>
</el-form>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -306,8 +402,14 @@ import {
editCompanyConfigApi, editCompanyConfigApi,
baseModuleList, baseModuleList,
getCompanyModuleList, getCompanyModuleList,
baseModuleProjectEdit baseModuleProjectEdit,
addHeadquarterCompanyApi,//
editHeadquarterCompanyApi,
deleteHeadquarterCompanyApi,
} from '@/assets/js/api/jxjadmin.js' } from '@/assets/js/api/jxjadmin.js'
import {
checkPhone
} from '@/assets/js/util.js'
export default { export default {
name: 'registerAudit', name: 'registerAudit',
data() { data() {
@ -348,13 +450,131 @@ export default {
customerServicePhone: '', customerServicePhone: '',
styleType: 1, styleType: 1,
canGoProjectEnd: 0, canGoProjectEnd: 0,
canAddProject: 0 canAddProject: 0,
diaLogShow: false,
addEditForm: {
companyName: '',
account: '',
companyTel: '',
showPassword: '',
},
addEditRules: {
companyName: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
account: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
showPassword: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
companyTel: [
{
required: true,
message: '必填',
trigger: 'blur'
},
{
required: true,
message: '必填',
trigger: 'change'
}
],
},
titleRes: '',
} }
}, },
created() { created() {
this.getListData() this.getListData()
}, },
methods: { methods: {
addReg() {
this.diaLogShow = true
this.titleRes = '添加企业'
},
edit(obj) {
console.log('编辑', obj);
this.diaLogShow = true
this.addEditForm = JSON.parse(JSON.stringify(obj))
this.titleRes = '编辑企业'
},
//
deleteDev(obj) {
this.$confirm("此操作将永久删除, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteHeadquarterCompanyApi({ id: obj.companyId }).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getListData()
}
})
})
.catch(() => { })
},
submit() {
if (this.addEditForm.companyTel) {
if (!checkPhone(this.addEditForm.companyTel)) {
this.$message.error('请输入正确的手机号码')
return
}
}
let params = JSON.parse(JSON.stringify(this.addEditForm))
params.projectSn = this.$store.state.projectSn
this.$refs.addEditForm.validate((valid) => {
if (valid) {
if (this.titleRes == '添加企业') {
addHeadquarterCompanyApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getListData()
}
})
} else if (this.titleRes == '编辑企业') {
editHeadquarterCompanyApi(params).then((result) => {
if (result.success) {
this.$message.success(result.message)
this.getListData()
}
})
}
this.diaLogShow = false
} else {
return false
}
})
},
saveFn() { saveFn() {
if (this.time == '') { if (this.time == '') {
this.$message.error('请选择授权时长!') this.$message.error('请选择授权时长!')
@ -485,7 +705,13 @@ export default {
this.checkAll = checkedCount === this.cityOptions.length this.checkAll = checkedCount === this.cityOptions.length
this.isIndeterminate = this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cityOptions.length checkedCount > 0 && checkedCount < this.cityOptions.length
} },
close() {
this.addEditForm = {}
this.$nextTick(() => {
this.$refs.addEditForm.clearValidate()
})
},
} }
} }
</script> </script>

View File

@ -27,7 +27,7 @@
filterLeave(item.safetyLevel) filterLeave(item.safetyLevel)
}} }}
</p> </p>
<!-- 完工状态 进行中 --> <!-- 完工状态 进行中 修复-->
<p> <p>
{{ $t('message.deepFoundConfig.finishStatus') }} {{ $t('message.deepFoundConfig.finishStatus') }}
<span <span
@ -229,7 +229,7 @@
onafterpaste="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<!-- 基坑周长 --> <!-- 基坑周长 设置只能输入正数-->
<el-form-item <el-form-item
:label=" :label="
$t('message.deepFoundConfig.deepFoundPerimeter') + '(m)' $t('message.deepFoundConfig.deepFoundPerimeter') + '(m)'

View File

@ -1421,6 +1421,7 @@ export default {
chart2.setOption(this.option2) chart2.setOption(this.option2)
}, },
createdEchart3() { createdEchart3() {
//
// console.log(this.$refs['echart3']) // console.log(this.$refs['echart3'])
let chart3 = echarts.init(this.$refs['echart3']) let chart3 = echarts.init(this.$refs['echart3'])
this.chart3 = chart3 this.chart3 = chart3

View File

@ -175,7 +175,7 @@ export default {
// //
exportBtn() { exportBtn() {
fetch(this.$http.defaults.baseURL + '/xmgl/fpdcd/exportXls?&projectSn=' + this.projectSn + '&endReceiveTime=' + this.time[1] + '&startReceiveTime=' + this.time[0] + '&devName=' + this.devName, { fetch(this.$http.defaults.baseURL + 'xmgl/fpdcd/exportXls?&projectSn=' + this.projectSn + '&endReceiveTime=' + this.time[1] + '&startReceiveTime=' + this.time[0] + '&devName=' + this.devName, {
headers: { headers: {
'Authorization': this.$store.state.userInfo.token 'Authorization': this.$store.state.userInfo.token
} }

View File

@ -347,6 +347,7 @@
v-if="scope.row.devOpType == 1 || scope.row.devOpType == 2" v-if="scope.row.devOpType == 1 || scope.row.devOpType == 2"
placeholder="请输入" placeholder="请输入"
v-model="scope.row.deviceSn" v-model="scope.row.deviceSn"
type="number"
></el-input> ></el-input>
<span v-else>{{ scope.row.deviceSn }}</span> <span v-else>{{ scope.row.deviceSn }}</span>
</template> </template>

View File

@ -2028,7 +2028,7 @@ export default {
exportM() { exportM() {
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +
'/xmgl/download/exporExcelWorkerTemplate?projectSn=' + 'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn this.projectSn
}, },
// //

View File

@ -2301,7 +2301,7 @@ export default {
exportM() { exportM() {
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +
'/xmgl/download/exporExcelWorkerTemplate?projectSn=' + 'xmgl/download/exporExcelWorkerTemplate?projectSn=' +
this.projectSn this.projectSn
}, },
// //

View File

@ -123,7 +123,7 @@ export default {
// //
exportBtn() { exportBtn() {
fetch(this.$http.defaults.baseURL + '/xmgl/poisonousGasDevCurrentData/exportXls?&projectSn=' + this.projectSn + '&queryEndTime=' + this.time[1] + '&queryStartTime=' + this.time[0] + '&devName=' + this.devName, { fetch(this.$http.defaults.baseURL + 'xmgl/poisonousGasDevCurrentData/exportXls?&projectSn=' + this.projectSn + '&queryEndTime=' + this.time[1] + '&queryStartTime=' + this.time[0] + '&devName=' + this.devName, {
headers: { headers: {
'Authorization': this.$store.state.userInfo.token 'Authorization': this.$store.state.userInfo.token
} }