22344843 by xiaomiao

合并

2 parents 9642781a 03dbaf2e
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-27 13:25:25
* @LastEditTime: 2023-03-27 15:43:24
-->
# 安装依赖
npm install
......@@ -21,4 +21,16 @@ npm install --registry=https://registry.npm.taobao.org
- `wip` 开发中
## 项目换肤
给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量
\ No newline at end of file
给html根标签设置一个data-theme属性,然后通过js切换data-theme的属性值,Scss根据此属性来判断使用对应主题变量
## config说明
{
"TITLE": "汉中市数据上报系统",
"THEME": "sb",
"CODE": "BDCJGPT", {"BDCSBPT":上报: "BDCJGPT":监管}
"SERVERAPI": "/bdcsjsb",
"calcHeight": 200, {上报:160 监管:200}
"echartTextColor": "#FFFFFF", {上报:"#4A4A4A" 监管:"#FFFFFF"}
"MANAGEMENTAPI": "http://192.168.2.38:8090/management"
}
\ No newline at end of file
......
......@@ -3,5 +3,7 @@
"THEME": "sb",
"CODE": "BDCJGPT",
"SERVERAPI": "/bdcsjsb",
"calcHeight": 160,
"echartTextColor": "#4A4A4A",
"MANAGEMENTAPI": "http://192.168.2.38:8090/management"
}
\ No newline at end of file
......
......@@ -139,11 +139,25 @@ export default {
let _this = this
if (this.heightNum) {
_this.$nextTick(() => {
window.addEventListener('resize', () => {
if (document.querySelector(".tags-view-container")) {
window.addEventListener('resize', () => {
if (_this.calcHeight == 230) {
_this.tableHeight = _this.calcHeightx(192)
} else {
_this.tableHeight = _this.calcHeightx(_this.calcHeight)
}
});
if (_this.calcHeight == 230) {
_this.tableHeight = _this.calcHeightx(192)
} else {
_this.tableHeight = _this.calcHeightx(_this.calcHeight)
}
} else {
window.addEventListener('resize', () => {
_this.tableHeight = _this.calcHeightx(_this.calcHeight)
});
_this.tableHeight = _this.calcHeightx(_this.calcHeight)
});
_this.tableHeight = _this.calcHeightx(_this.calcHeight)
}
})
} else {
_this.tableHeight = window.innerHeight - _this.heightNum
......@@ -158,9 +172,15 @@ export default {
calcHeightx (value, wappered = true) {
//项目自定义的公共header部分的高度,可忽略
let header = document.querySelector(".from-clues-header").offsetHeight;
//value为动态计算table界面高度时,减去的其他空白部分,需自行在调试找到临界值,剩下的就是table表格的高度(包含header+body部分)
value = value == undefined ? 100 : value;
let res = window.innerHeight - parseInt(header) - value;
if (document.querySelector(".tags-view-container")) {
let tagsView = document.querySelector(".tags-view-container").offsetHeight;
var res = window.innerHeight - parseInt(header) - value - parseInt(tagsView);
} else {
var res = window.innerHeight - parseInt(header) - value;
}
if (wappered) {
//通过原生方法,获取dom节点的高度------获取element-ui table表格body的元素
let wapper = window.document.getElementsByClassName('el-table__body-wrapper');
......
......@@ -15,14 +15,4 @@ export default {
}
}
}
</script>
<style lang="scss" scoped>
.hasTagsView {
.app-main {
overflow-x: auto;
box-sizing: border-box;
background-color: #EDF1F7;
box-sizing: border-box;
}
}
</style>
\ No newline at end of file
</script>
\ No newline at end of file
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-22 10:23:46
* @LastEditTime: 2023-03-28 10:12:27
-->
<template>
<section>
<transition name="fade-transform" mode="out-in">
<router-view />
</transition>
</section>
<transition name="fade-transform" mode="out-in">
<router-view />
</transition>
</template>
<script>
export default {
......
......@@ -6,14 +6,12 @@
<h4>不动产登记上报系统</h4>
</div>
<div class="right-menu">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
<div class="user">
{{ userName }}
<span @click="onCancel">
<i class="el-icon-switch-button"></i>
</span>
</div>
</el-dropdown>
<div class="user">
{{ userName }}
<span @click="onCancel">
<i class="el-icon-switch-button"></i>
</span>
</div>
</div>
</div>
</div>
......
......@@ -194,12 +194,12 @@ export default {
@import "~@/styles/_handle.scss";
.tags-view-container {
height: 40px;
height: 50px;
width: 100%;
background: #fff;
border-bottom: 1px solid #d8dce5;
box-sizing: border-box;
padding-top: 2px;
padding-top: 7px;
margin-bottom: 7px;
border-radius: 4px;
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-23 09:21:00
* @LastEditTime: 2023-03-28 10:14:20
-->
<template>
<div class="app-wrapper">
<navbar />
<div class="main-container">
<sidebar class="sidebar-container" />
<div class="app-main">
<div class="app-content">
<tags-view v-if="needTagsView" />
<app-main />
</div>
......@@ -40,17 +40,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.app-main {
height: calc(100vh - 74px);
overflow-x: hidden;
box-sizing: border-box;
flex: 1;
width: 100%;
background: #EAEBF0;
padding: 10px;
}
</style>
<style lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/sbSidebar.scss";
......@@ -83,4 +72,13 @@ export default {
width: 100%;
transition: width 0.28s;
}
.app-content {
overflow-x: hidden;
box-sizing: border-box;
flex: 1;
width: 100%;
background: #EAEBF0;
padding: 10px;
}
</style>
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-01-16 09:10:12
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-23 15:15:02
* @LastEditTime: 2023-03-27 16:54:34
* @FilePath: \bdcjg-web\src\main.js
* @Description:
*
......@@ -19,7 +19,6 @@ import mixin from '@/utils/mixin/theme.js'
import axios from 'axios'
import dataV from '@jiaminghi/data-view';
import * as echarts from "echarts"
import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading'
Vue.mixin(mixin)
import './directive/vxe-table'
......@@ -68,4 +67,5 @@ axios.get("./config.json")
store,
render: h => h(App)
})
window.document.documentElement.setAttribute("data-theme", 'blue');
})
\ No newline at end of file
......
......@@ -20,7 +20,7 @@ router.beforeEach(async (to, from, next) => {
localStorage.removeItem("token");
next();
} else {
window.document.documentElement.setAttribute("data-theme", 'blue');
let code = Vue.prototype.BASE_API.CODE
//判断token是否存在
const hasToken = localStorage.getItem("token");
......
......@@ -190,6 +190,27 @@
}
}
.echarts-box {
display: flex;
justify-content: center;
height: calc(100vh - 260px);
}
.complex-header {
.el-table--border th.el-table__cell {
border-bottom: 1px solid #458ACF !important;
}
.el-table--border .el-table__cell {
border-right: 1px solid #458ACF !important;
}
.el-table--group,
.el-table--border {
border: 1px solid #458ACF !important;
}
}
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next {
@extend .bgc;
......
......@@ -9,7 +9,7 @@
.from-clues {
height: 100%;
// height: 100%;
width: 100%;
min-width: 1280px;
box-sizing: border-box;
......@@ -17,9 +17,8 @@
&-header {
width: 100%;
padding: 7px 15px 10px 15px;
padding: 7px 15px 15px 15px;
box-sizing: border-box;
background-size: 100% 100%;
background: #FFFFFF;
border-radius: 4px;
}
......@@ -30,7 +29,6 @@
margin-top: 10px;
background: #FFFFFF;
border-radius: 4px;
background-size: 100% 100%;
padding: 15px;
}
......@@ -57,6 +55,12 @@
}
}
.echarts-box {
display: flex;
justify-content: center;
height: calc(100vh - 230px);
}
/* --------------进度条美化---------------- */
::-webkit-scrollbar {
width: 7px;
......@@ -169,7 +173,6 @@
width: 2px;
position: relative;
left: 10px;
color: #FFFFFF;
}
.el-breadcrumb__inner {
......
......@@ -4,7 +4,7 @@
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item v-if="BASE_API.THEME=='jg'">
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......
/deep/.el-table--border th.el-table__cell {
border-bottom: 1px solid #458ACF !important;
}
/deep/.el-table--border .el-table__cell {
border-right: 1px solid #458ACF !important;
}
/deep/.el-table thead.is-group th.el-table__cell {
background-color: transparent !important;
}
......@@ -17,9 +9,4 @@
.export-excel-wrapper {
display: inline-block;
}
/deep/.el-table--group,
.el-table--border {
border: 1px solid #458ACF !important;
}
\ No newline at end of file
......
......@@ -4,7 +4,7 @@
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item>
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......@@ -32,8 +32,8 @@
</el-form>
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :header-cell-style="headerStyle1" :calcHeight="200" :pagination="false"
<div class="from-clues-content complex-header">
<lb-table ref="table" :header-cell-style="headerStyle1" :calcHeight="BASE_API.calcHeight" :pagination="false"
:column="tableData.columns" :data="tableData.data">
</lb-table>
......@@ -171,6 +171,7 @@ export default {
</script>
<style scoped lang="scss">
@import "../css/index.scss";
/deep/th.el-table__cell {
height: 0 !important;
}
......
......@@ -4,7 +4,7 @@
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item>
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......@@ -33,10 +33,9 @@
</el-form>
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :pagination="false" :calcHeight="200" :column="tableData.columns" :data="tableData.data">
<div class="from-clues-content complex-header">
<lb-table ref="table" :pagination="false" :calcHeight="BASE_API.calcHeight" :column="tableData.columns" :data="tableData.data">
</lb-table>
<down-lb-table ref="table" v-show="false" :id="'mytable'" :downExcel="true" :pagination="false"
:column="tableData.columns" :data="tableData.data" :downTitle="downTitle">
</down-lb-table>
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-02-17 16:32:50
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-15 10:42:21
* @LastEditTime: 2023-03-28 10:24:52
* @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue
* @Description:
*
......@@ -14,7 +14,7 @@
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item>
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......@@ -42,9 +42,9 @@
</el-form>
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-table ref="table" :pagination="false" :border="true" :calcHeight="200" :header-cell-style="headerStyle"
:column="tableData.columns" :data="tableData.data">
<div class="from-clues-content complex-header">
<lb-table ref="table" :pagination="false" :border="true" :calcHeight="BASE_API.calcHeight"
:header-cell-style="headerStyle" :column="tableData.columns" :data="tableData.data">
</lb-table>
<down-lb-table ref="table" v-show="false" :id="'mytable'" :header-cell-style="headerStyle1" :downExcel="true"
:pagination="false" :column="tableData.columns" :data="tableData.data" :downTitle="downTitle">
......
......@@ -11,7 +11,7 @@
<el-input v-model.trim="form.menuName" class="width100" clearable placeholder="菜单名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="3" class="btnColRight">
<el-col :span="20" class="btnColRight">
<btn nativeType="cx" @click="searchQuery">查询</btn>
<btn nativeType="cx" @click="handleAdd()">新增菜单</btn>
</el-col>
......@@ -19,7 +19,7 @@
</el-form>
</div>
<div class="from-clues-content">
<lb-table :pagination="false" :column="tableData.columns" :calcHeight="200" :data="tablelistData" row-key="id"
<lb-table :pagination="false" :column="tableData.columns" :calcHeight="BASE_API.calcHeight" :data="tablelistData" row-key="id"
default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
</lb-table>
......
......@@ -2,7 +2,7 @@
<div class="timedTask from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item v-if="BASE_API.THEME=='jg'">
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......@@ -11,7 +11,7 @@
<el-input v-model.trim="form.rolesName" class="width100" clearable placeholder="角色名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="3" class="btnColRight">
<el-col :span="20" class="btnColRight">
<btn nativeType="cx" @click="searchQuery">查询</btn>
<btn nativeType="cx" @click="handleAddEdit">增加角色</btn>
</el-col>
......@@ -19,7 +19,7 @@
</el-form>
</div>
<div class="from-clues-content">
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200"
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="BASE_API.calcHeight"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata" :expand-row-keys="keyList"
row-key="dictid">
</lb-table>
......
......@@ -2,10 +2,10 @@
<div class="timedTask from-clues">
<div class="from-clues-header">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item v-if="BASE_API.THEME=='jg'">
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row>
<el-row class="mb-5">
<el-col :span="6">
<el-form-item label="搜索标题">
<el-input v-model="form.jobName" placeholder="标题"></el-input>
......@@ -104,152 +104,207 @@
this.taskData = null
this.isDialog = true
},
resetSe () {
this.form.jobName = ''
this.featchData()
selectionList: [],
tableData: {
columns: [{
label: '序号',
type: 'index',
width: '50',
index: this.indexMethod,
}].concat(data.columns()).concat([
{
label: "操作",
width: 380,
render: (h, scope) => {
return (
<div>
<el-button type="text"
v-show={scope.row.jobStatus === 0}
class='btnColor'
icon="el-icon-video-pause"
onClick={() => { this.handleActive(scope.row) }}>激活
</el-button>
<el-button type="text"
v-show={scope.row.jobStatus === -1}
class='btnColor'
icon="el-icon-video-pause"
onClick={() => { this.recover(scope.row) }}>恢复
</el-button>
<el-button type="text"
icon="el-icon-edit"
class='btnColor'
onClick={() => { this.handleEdit(scope.row) }}>编辑
</el-button>
<el-button type="text"
icon="el-icon-delete"
class='successColor'
v-show={scope.row.jobStatus !== -1}
onClick={() => { this.handleDel(scope.row) }}>删除
</el-button>
</div>
);
},
},
]),
data: []
},
async featchData () {
try {
this.form = Object.assign(this.form, this.formData)
let { result } = await sjsbTask.getTaskListByName(this.form)
this.tableData.data = result.list
} catch (error) {
this.message = error
}
pageData: {
total: 0,
pageSize: 15,
current: 1,
},
recover (row) {
this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.recover(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
},
methods: {
handleAdd () {
this.taskData = null
this.isDialog = true
},
resetSe () {
this.form.jobName = ''
this.featchData()
},
async featchData () {
try {
this.form = Object.assign(this.form, this.formData)
let { result } = await sjsbTask.getTaskListByName(this.form)
this.tableData.data = result.list
} catch (error) {
this.message = error
}
},
recover (row) {
this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.recover(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
},
handleActive (row) {
this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.active(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
},
handleActive (row) {
this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.active(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
},
// 暂停
handleSuspend (row) {
this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.pauseJob(row.id)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
},
// 暂停
handleSuspend (row) {
this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.pauseJob(row.id)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
},
handleEdit (row) {
this.taskData = row
this.isDialog = true
},
handleDel (row) {
this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.sjsbTaskRemove(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
},
handleEdit (row) {
this.taskData = row
this.isDialog = true
},
handleDel (row) {
this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
sjsbTask.sjsbTaskRemove(row.jobId)
.then((res) => {
if ((res.code = 200)) {
this.$message({
type: 'success',
message: res.message,
})
this.featchData()
}
})
.catch((error) => {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消',
})
}
})
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
// @import "~@/styles/mixin.scss";
</style>
......
......@@ -2,7 +2,7 @@
<div class="timedTask from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="100px">
<el-form-item v-if="BASE_API.THEME=='jg'">
<el-form-item v-if="BASE_API.THEME == 'jg'">
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
......@@ -22,7 +22,7 @@
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col :span="3" class="btnColRight">
<el-col :span="12" class="btnColRight">
<btn nativeType="cx" @click="getTableList">查询</btn>
<btn nativeType="cx" @click="handleAdd">添加人员</btn>
</el-col>
......@@ -31,7 +31,8 @@
</div>
<div class="from-clues-content">
<lb-table :pagination="false" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :calcHeight="200" :data="tableData.data" :expand-row-keys="keyList" row-key="dictid">
:column="tableData.columns" :calcHeight="BASE_API.calcHeight" :data="tableData.data" :expand-row-keys="keyList"
row-key="dictid">
</lb-table>
</div>
<EditDialog ref="dialogForm" v-model="isDialog" @ok="reloadTableData" />
......@@ -408,5 +409,5 @@ export default {
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
</style>
......