feat: 样式修改和政务管理全选,加接口loading
This commit is contained in:
parent
ddd33ae0c7
commit
6ae15e8667
@ -6,7 +6,7 @@
|
|||||||
"author": "SpicyBoy <848130454@qq.com>",
|
"author": "SpicyBoy <848130454@qq.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --mode production",
|
"dev": "vite --mode development",
|
||||||
"serve": "vite",
|
"serve": "vite",
|
||||||
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
||||||
"build:test": "vue-tsc --noEmit && vite build --mode test",
|
"build:test": "vue-tsc --noEmit && vite build --mode test",
|
||||||
|
|||||||
42
src/Test.vue
42
src/Test.vue
@ -1,42 +0,0 @@
|
|||||||
<!-- <template>
|
|
||||||
<div class="test">
|
|
||||||
<div class="item" v-for="item in data" :key="item.id">
|
|
||||||
<slot>
|
|
||||||
{{ item.name }}
|
|
||||||
</slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import axios from 'axios';
|
|
||||||
import { onMounted, ref, computed } from 'vue'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
|
||||||
url: string;
|
|
||||||
data?: object;
|
|
||||||
params?: object;
|
|
||||||
request?(): any;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const request = computed(() => props.request ? props.request : () => axios({
|
|
||||||
method: 'post',
|
|
||||||
url: props.url,
|
|
||||||
data: props.data,
|
|
||||||
params: props.params
|
|
||||||
}))
|
|
||||||
|
|
||||||
const data = ref([])
|
|
||||||
|
|
||||||
const requestData = async () => {
|
|
||||||
const { result } = await request.value();
|
|
||||||
data.value = result;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
requestData();
|
|
||||||
}),
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less"></style> -->
|
|
||||||
@ -84,7 +84,7 @@ export const noticedelMyPost = (params: { noticeId: number }) => {
|
|||||||
};
|
};
|
||||||
// 通过id查询通知公告表信息
|
// 通过id查询通知公告表信息
|
||||||
export const noticeDetailMyPost = (params: { noticeId: string }) => {
|
export const noticeDetailMyPost = (params: { noticeId: string }) => {
|
||||||
return http.post(BASEURL + `/xmgl/notice/queryById`, params);
|
return http.post(BASEURL + `/xmgl/notice/queryById`, params, { headers: { noLoading: true } });
|
||||||
};
|
};
|
||||||
// 阅读通知公告
|
// 阅读通知公告
|
||||||
export const noticeReadMyPost = (params: { noticeId: string }) => {
|
export const noticeReadMyPost = (params: { noticeId: string }) => {
|
||||||
|
|||||||
@ -120,15 +120,15 @@ export const getRoleNamelist = (params: { state: number | string }) => {
|
|||||||
|
|
||||||
// 列表查询系统用户表信息 用户通知公告中获取政务人员
|
// 列表查询系统用户表信息 用户通知公告中获取政务人员
|
||||||
export const getgovNamelist = (params: {}) => {
|
export const getgovNamelist = (params: {}) => {
|
||||||
return http.post(BASEURL + `/gov/systemUser/list`, params);
|
return http.post(BASEURL + `/gov/systemUser/list`, params, { headers: { noLoading: true } });
|
||||||
};
|
};
|
||||||
// 政务列表查询企业 通知通告的企业
|
// 政务列表查询企业 通知通告的企业
|
||||||
export const getentNamelist = (params: {}) => {
|
export const getentNamelist = (params: {}) => {
|
||||||
return http.post(BASEURL + `/gov/enterprise/list`, params);
|
return http.post(BASEURL + `/gov/enterprise/list`, params, { headers: { noLoading: true } });
|
||||||
};
|
};
|
||||||
// 同上 项目
|
// 同上 项目
|
||||||
export const getproNamelist = (params: {}) => {
|
export const getproNamelist = (params: {}) => {
|
||||||
return http.post(BASEURL + `/gov/project/list`, params);
|
return http.post(BASEURL + `/gov/project/list`, params, { headers: { noLoading: true } });
|
||||||
};
|
};
|
||||||
|
|
||||||
// 部门管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
// 部门管理!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|||||||
@ -16,7 +16,7 @@ const BASEURL = import.meta.env.VITE_API_URL;
|
|||||||
export const loginApi = (params: Login.ReqLoginForm) => {
|
export const loginApi = (params: Login.ReqLoginForm) => {
|
||||||
return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 正常 post json 请求 ==> application/json
|
return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 正常 post json 请求 ==> application/json
|
||||||
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 控制当前请求不显示 loading
|
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 控制当前请求不显示 loading
|
||||||
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456
|
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456 //标记
|
||||||
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
|
// return http.post<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
|
||||||
// return http.get<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // 如果是 get 请求可以携带数组等复杂参数
|
// return http.get<Login.ResLogin>(BASEURL + `/xmgl/systemUser/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // 如果是 get 请求可以携带数组等复杂参数
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card table-search" v-if="columns.length">
|
<div class="card table-search" v-if="columns.length">
|
||||||
<el-form :inline="true" style="display: flex; flex-wrap: wrap" ref="formRef" :model="searchParam">
|
<el-form :inline="true" style="display: flex; flex-wrap: wrap" ref="formRef" :model="searchParam">
|
||||||
<!-- <Grid ref="gridRef" :collapsed="collapsed" :gap="[20, 0]" :cols="searchCol"> -->
|
|
||||||
<!-- <GridItem v-for="(item, index) in columns" class="girdItem" :key="item.prop" v-bind="getResponsive(item)" :index="index"> -->
|
|
||||||
<div v-for="(item, index) in columns" class="girdItem" :key="item.prop">
|
<div v-for="(item, index) in columns" class="girdItem" :key="item.prop">
|
||||||
<el-form-item :label="`${item.label} `">
|
<el-form-item :label="`${item.label} `">
|
||||||
<SearchFormItem :column="item" :searchParam="searchParam" />
|
<SearchFormItem :column="item" :searchParam="searchParam" />
|
||||||
@ -14,54 +12,15 @@
|
|||||||
<el-button type="primary" @click="search">查询</el-button>
|
<el-button type="primary" @click="search">查询</el-button>
|
||||||
<el-button style="background-color: #ffb750; color: #fff" v-if="onReset" @click="reset">刷新</el-button>
|
<el-button style="background-color: #ffb750; color: #fff" v-if="onReset" @click="reset">刷新</el-button>
|
||||||
<slot name="formButton" style="margin: 0 10px"></slot>
|
<slot name="formButton" style="margin: 0 10px"></slot>
|
||||||
<!-- <el-button type="success" v-if="addButton" @click="reset">新增</el-button> -->
|
|
||||||
|
|
||||||
<!-- <el-button v-if="showCollapse" type="primary" link class="search-isOpen" @click="collapsed = !collapsed">
|
|
||||||
{{ collapsed ? "展开" : "合并" }}
|
|
||||||
<el-icon class="el-icon--right">
|
|
||||||
<component :is="collapsed ? ArrowDown : ArrowUp"></component>
|
|
||||||
</el-icon>
|
|
||||||
</el-button> -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <GridItem suffix> </GridItem> -->
|
|
||||||
<!-- </Grid> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
||||||
|
|
||||||
<!-- <el-form ref="formRef" :model="searchParam">
|
|
||||||
<Grid ref="gridRef" :collapsed="collapsed" :gap="[20, 0]" :cols="searchCol">
|
|
||||||
<GridItem v-for="(item, index) in columns" class="girdItem" :key="item.prop" v-bind="getResponsive(item)" :index="index">
|
|
||||||
<el-form-item :label="`${item.label} `">
|
|
||||||
<SearchFormItem :column="item" :searchParam="searchParam" />
|
|
||||||
</el-form-item>
|
|
||||||
</GridItem>
|
|
||||||
<div class="operation">
|
|
||||||
<el-button type="primary" @click="search">查询</el-button>
|
|
||||||
<el-button style="background-color: #ffb750; color: #fff" v-if="onReset" @click="reset">刷新</el-button>
|
|
||||||
<slot name="formButton" style="margin: 0 10px"></slot> -->
|
|
||||||
<!-- <el-button type="success" v-if="addButton" @click="reset">新增</el-button> -->
|
|
||||||
|
|
||||||
<!-- <el-button v-if="showCollapse" type="primary" link class="search-isOpen" @click="collapsed = !collapsed">
|
|
||||||
{{ collapsed ? "展开" : "合并" }}
|
|
||||||
<el-icon class="el-icon--right">
|
|
||||||
<component :is="collapsed ? ArrowDown : ArrowUp"></component>
|
|
||||||
</el-icon>
|
|
||||||
</el-button> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- <GridItem suffix> </GridItem> -->
|
|
||||||
<!-- </Grid> -->
|
|
||||||
<!-- </el-form> -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="SearchForm">
|
<script setup lang="ts" name="SearchForm">
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import { BreakPoint } from "@/components/Grid/interface";
|
import { BreakPoint } from "@/components/Grid/interface";
|
||||||
import { Search, ArrowDown, ArrowUp } from "@element-plus/icons-vue";
|
|
||||||
import SearchFormItem from "./components/SearchFormItem.vue";
|
import SearchFormItem from "./components/SearchFormItem.vue";
|
||||||
import Grid from "@/components/Grid/index.vue";
|
|
||||||
import GridItem from "@/components/Grid/components/GridItem.vue";
|
|
||||||
|
|
||||||
interface ProTableProps {
|
interface ProTableProps {
|
||||||
columns?: ColumnProps[]; // 搜索配置列
|
columns?: ColumnProps[]; // 搜索配置列
|
||||||
@ -79,51 +38,23 @@ const props = withDefaults(defineProps<ProTableProps>(), {
|
|||||||
searchParam: () => ({})
|
searchParam: () => ({})
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取响应式设置
|
|
||||||
const getResponsive = (item: ColumnProps) => {
|
|
||||||
return {
|
|
||||||
span: item.search?.span,
|
|
||||||
offset: item.search?.offset ?? 0,
|
|
||||||
xs: item.search?.xs,
|
|
||||||
sm: item.search?.sm,
|
|
||||||
md: item.search?.md,
|
|
||||||
lg: item.search?.lg,
|
|
||||||
xl: item.search?.xl
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// 是否默认折叠搜索项
|
|
||||||
const collapsed = ref(false);
|
|
||||||
|
|
||||||
// 获取响应式断点
|
// 获取响应式断点
|
||||||
const gridRef = ref();
|
const gridRef = ref();
|
||||||
const breakPoint = computed<BreakPoint>(() => gridRef.value?.breakPoint);
|
|
||||||
|
|
||||||
// 判断是否显示 展开/合并 按钮
|
|
||||||
// const showCollapse = computed(() => {
|
|
||||||
// let show = false;
|
|
||||||
// props.columns.reduce((prev, current) => {
|
|
||||||
// prev +=
|
|
||||||
// (current.search![breakPoint.value]?.span ?? current.search?.span ?? 1) +
|
|
||||||
// (current.search![breakPoint.value]?.offset ?? current.search?.offset ?? 0);
|
|
||||||
// if (typeof props.searchCol !== "number") {
|
|
||||||
// if (prev >= props.searchCol[breakPoint.value]) show = true;
|
|
||||||
// } else {
|
|
||||||
// if (prev > props.searchCol) show = true;
|
|
||||||
// }
|
|
||||||
// return prev;
|
|
||||||
// }, 0);
|
|
||||||
// return show;
|
|
||||||
// });
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.girdItem {
|
// .girdItem {
|
||||||
display: flex;
|
// padding-top: 6px;
|
||||||
}
|
// }
|
||||||
:deep(.el-form .el-form-item__content .el-range-editor) {
|
:deep(.el-form .el-form-item__content .el-range-editor) {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
// :deep(.el-form-item--default) {
|
||||||
|
// margin-bottom: 0;
|
||||||
|
// }
|
||||||
|
// .table-search :deep(.operation) {
|
||||||
|
// margin-bottom: 0;
|
||||||
|
// }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -88,17 +88,17 @@ const goHome = () => {
|
|||||||
.el-menu-item {
|
.el-menu-item {
|
||||||
&.is-active {
|
&.is-active {
|
||||||
// background: var(--el-color-primary-light-9);
|
// background: var(--el-color-primary-light-9);
|
||||||
// &::before {
|
&::before {
|
||||||
// position: absolute;
|
position: absolute;
|
||||||
// top: 12px;
|
top: 12px;
|
||||||
// bottom: 0;
|
bottom: 0;
|
||||||
// right: 0;
|
right: 0;
|
||||||
// width: 4px;
|
width: 4px;
|
||||||
// height: 38px;
|
height: 38px;
|
||||||
// content: "";
|
content: "";
|
||||||
// background: var(--el-color-primary);
|
background: var(--el-color-primary);
|
||||||
// }
|
}
|
||||||
border-right: 4px solid #008bff;
|
// border-right: 4px solid #008bff;
|
||||||
&.is:hover {
|
&.is:hover {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,10 +31,6 @@ import pinia from "@/stores/index";
|
|||||||
// svg icons
|
// svg icons
|
||||||
import "virtual:svg-icons-register";
|
import "virtual:svg-icons-register";
|
||||||
|
|
||||||
// import "@/assets/js/jquery-1.12.4.min.js";
|
|
||||||
// import "@/assets/js/jsencrypt.min.js";
|
|
||||||
// import "@/assets/js/jsWebControl-1.0.0.min.js";
|
|
||||||
|
|
||||||
// errorHandler
|
// errorHandler
|
||||||
// import errorHandler from "@/utils/errorHandler";
|
// import errorHandler from "@/utils/errorHandler";
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
// border: 1px solid var(--el-border-color-light);
|
// border: 1px solid var(--el-border-color-light);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
// box-shadow: 0 0 12px rgb(0 0 0 / 5%);
|
// box-shadow: 0 0 12px rgb(0 0 0 / 5%);
|
||||||
height: 56px;
|
// height: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * 不需要 card 卡片样式(在组件内使用 proTable 会使用到)
|
// * 不需要 card 卡片样式(在组件内使用 proTable 会使用到)
|
||||||
@ -94,9 +94,11 @@
|
|||||||
|
|
||||||
// table-search 表格搜索样式
|
// table-search 表格搜索样式
|
||||||
.table-search {
|
.table-search {
|
||||||
padding: 12px 0 12px 36px;
|
padding: 12px 0 0px 36px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
// background-color: pink;
|
||||||
|
box-sizing: border-box;
|
||||||
.el-form {
|
.el-form {
|
||||||
.el-form-item__content > * {
|
.el-form-item__content > * {
|
||||||
width: 160px;
|
width: 160px;
|
||||||
|
|||||||
@ -129,7 +129,7 @@ const columns: ColumnProps[] = [
|
|||||||
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
||||||
{ prop: "createByName", label: "发布人名称" },
|
{ prop: "createByName", label: "发布人名称" },
|
||||||
{ prop: "createTime", label: "发布时间" },
|
{ prop: "createTime", label: "发布时间" },
|
||||||
{ prop: "createTime", label: "阅读状态" },
|
{ prop: "isRead", label: "阅读状态" },
|
||||||
{ prop: "operation", label: "操作", fixed: "right" }
|
{ prop: "operation", label: "操作", fixed: "right" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,13 @@ const columns: ColumnProps[] = [
|
|||||||
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
||||||
{ prop: "createByName", label: "发布人名称" },
|
{ prop: "createByName", label: "发布人名称" },
|
||||||
{ prop: "createTime", label: "发布时间" },
|
{ prop: "createTime", label: "发布时间" },
|
||||||
{ prop: "createTime", label: "阅读状态" },
|
{
|
||||||
|
prop: "isRead",
|
||||||
|
label: "阅读状态",
|
||||||
|
render: scoped => {
|
||||||
|
return scoped.row.isRead === 1 ? "已读" : "未读";
|
||||||
|
}
|
||||||
|
},
|
||||||
{ prop: "operation", label: "操作", fixed: "right" }
|
{ prop: "operation", label: "操作", fixed: "right" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -4,19 +4,22 @@
|
|||||||
.base-box {
|
.base-box {
|
||||||
// height: calc(100% + 20px);
|
// height: calc(100% + 20px);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 20px 10px 0 10px;
|
margin: 10px 10px 0 10px;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
.protable {
|
.protable {
|
||||||
// flex: 1;
|
// flex: 1;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: calc(100% - 134px);
|
height: calc(100% - 150px);
|
||||||
}
|
}
|
||||||
:deep(.el-card) {
|
:deep(.el-card) {
|
||||||
margin: 2px 10px 0px;
|
margin: 2px 10px 10px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
// padding-bottom: 6px;
|
// padding-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 12px 0 0 36px;
|
||||||
|
}
|
||||||
|
|||||||
@ -517,4 +517,11 @@ onMounted(async () => {
|
|||||||
.blueText {
|
.blueText {
|
||||||
color: #008bff;
|
color: #008bff;
|
||||||
}
|
}
|
||||||
|
:deep(.table-search) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
|
}
|
||||||
|
:deep(.el-form) {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -114,7 +114,8 @@
|
|||||||
<div class="allModular">
|
<div class="allModular">
|
||||||
<!-- 标记全选 -->
|
<!-- 标记全选 -->
|
||||||
<!-- <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="checkedState" label="全选" size="large" /> -->
|
<!-- <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="checkedState" label="全选" size="large" /> -->
|
||||||
<el-checkbox v-model="checkAll" @change="checkedState" label="全选" size="large" />
|
<!-- <el-checkbox v-model="checkAll" @change="checkedState" label="全选" size="large" /> -->
|
||||||
|
<el-checkbox v-model="checkAll" label="全选" @change="changeChecked" size="large" />
|
||||||
</div>
|
</div>
|
||||||
<div class="littleTitle">政务模块</div>
|
<div class="littleTitle">政务模块</div>
|
||||||
<div class="allModular">
|
<div class="allModular">
|
||||||
@ -161,7 +162,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="jxjGovernMent">
|
<script setup lang="tsx" name="jxjGovernMent">
|
||||||
import { ref, reactive, onMounted, watch } from "vue";
|
import { ref, reactive, onMounted, watch, computed } from "vue";
|
||||||
import { ElMessage, ElMessageBox, FormRules, FormInstance } from "element-plus";
|
import { ElMessage, ElMessageBox, FormRules, FormInstance } from "element-plus";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { User } from "@/api/interface";
|
import { User } from "@/api/interface";
|
||||||
@ -177,7 +178,8 @@ import {
|
|||||||
getGoverType,
|
getGoverType,
|
||||||
getGoverForm,
|
getGoverForm,
|
||||||
editGoverCheck,
|
editGoverCheck,
|
||||||
getDicList
|
getDicList,
|
||||||
|
goverMentlist
|
||||||
} from "@/api/modules/jxjview";
|
} from "@/api/modules/jxjview";
|
||||||
import { checkPhoneNumber } from "@/utils/eleValidate";
|
import { checkPhoneNumber } from "@/utils/eleValidate";
|
||||||
|
|
||||||
@ -355,20 +357,29 @@ const onRadio = async (val: number) => {
|
|||||||
governmentSelectList.value = res1.result.government;
|
governmentSelectList.value = res1.result.government;
|
||||||
projectSelectList.value = res1.result.project;
|
projectSelectList.value = res1.result.project;
|
||||||
companySelectList.value = res1.result.enterprise;
|
companySelectList.value = res1.result.enterprise;
|
||||||
|
const res2 = await getGoverForm({ governmentSn: governmentSn.value });
|
||||||
|
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((itemA, indexA) => {
|
||||||
|
res2.result.forEach((itemB, indexB) => {
|
||||||
|
if (itemA.moduleId == itemB) {
|
||||||
|
// governmentSelectList.value[indexA].select = true;
|
||||||
|
itemA.select = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkedState = () => {
|
watch(
|
||||||
// console.log("执行方法啦");
|
() => governmentSelectList.value.concat(projectSelectList.value, companySelectList.value),
|
||||||
if (checkAll.value) {
|
val => {
|
||||||
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((item, index, array) => {
|
checkAll.value = val.every(item => item.select);
|
||||||
item.select = true;
|
},
|
||||||
// isIndeterminate.value = false;
|
{ deep: true, immediate: true }
|
||||||
});
|
);
|
||||||
} else if (checkAll.value == false) {
|
|
||||||
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((item, index, array) => {
|
const changeChecked = val => {
|
||||||
item.select = false;
|
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach(item => {
|
||||||
});
|
item.select = val;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmitConfig = async (formEl: FormInstance | undefined) => {
|
const onSubmitConfig = async (formEl: FormInstance | undefined) => {
|
||||||
@ -401,6 +412,8 @@ const onSubmitConfig = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const governmentSn = ref("");
|
||||||
// 授权配置btn
|
// 授权配置btn
|
||||||
const onConfiguration = async (row: any) => {
|
const onConfiguration = async (row: any) => {
|
||||||
configureDialogVisible.value = true;
|
configureDialogVisible.value = true;
|
||||||
@ -414,6 +427,7 @@ const onConfiguration = async (row: any) => {
|
|||||||
governmentSelectList.value = res1.result.government;
|
governmentSelectList.value = res1.result.government;
|
||||||
projectSelectList.value = res1.result.project;
|
projectSelectList.value = res1.result.project;
|
||||||
companySelectList.value = res1.result.enterprise;
|
companySelectList.value = res1.result.enterprise;
|
||||||
|
governmentSn.value = row.governmentSn;
|
||||||
const res2 = await getGoverForm({ governmentSn: row.governmentSn });
|
const res2 = await getGoverForm({ governmentSn: row.governmentSn });
|
||||||
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((itemA, indexA) => {
|
governmentSelectList.value.concat(projectSelectList.value, companySelectList.value).forEach((itemA, indexA) => {
|
||||||
res2.result.forEach((itemB, indexB) => {
|
res2.result.forEach((itemB, indexB) => {
|
||||||
|
|||||||
@ -65,7 +65,7 @@ const loginRules = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const loginForm = reactive<Login.ReqLoginForm>({ account: "admin", showPassword: "123456" });
|
const loginForm = reactive<Login.ReqLoginForm>({ account: "", showPassword: "" });
|
||||||
const login = (formEl: FormInstance | undefined) => {
|
const login = (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
formEl.validate(async (valid, params) => {
|
formEl.validate(async (valid, params) => {
|
||||||
@ -80,7 +80,7 @@ const login = (formEl: FormInstance | undefined) => {
|
|||||||
globalStore.setAccount(result.account);
|
globalStore.setAccount(result.account);
|
||||||
globalStore.setAccountType(result.accountType);
|
globalStore.setAccountType(result.accountType);
|
||||||
globalStore.setProjectDateAuth(result.projectDateAuth);
|
globalStore.setProjectDateAuth(result.projectDateAuth);
|
||||||
globalStore.setIsManager(result.isManager);
|
globalStore.setIsManager(result.isManager); //我已知晓
|
||||||
|
|
||||||
// 2.添加动态路由
|
// 2.添加动态路由
|
||||||
// await initDynamicRouter();
|
// await initDynamicRouter();
|
||||||
|
|||||||
@ -94,7 +94,7 @@ import { ref, reactive, onMounted } from "vue";
|
|||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { ColumnProps } from "@/components/ProTable/interface";
|
import { ColumnProps } from "@/components/ProTable/interface";
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import { myNoticeReceivePage, noticeDetailMyPost } from "@/api/modules/common";
|
import { myNoticeReceivePage, noticeDetailMyPost, noticeReadMyPost } from "@/api/modules/common";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue";
|
import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue";
|
||||||
import type { UploadFile } from "@/components/FilesUpload/FilesUpload.vue";
|
import type { UploadFile } from "@/components/FilesUpload/FilesUpload.vue";
|
||||||
@ -129,7 +129,7 @@ const columns: ColumnProps[] = [
|
|||||||
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
||||||
{ prop: "createByName", label: "发布人名称" },
|
{ prop: "createByName", label: "发布人名称" },
|
||||||
{ prop: "createTime", label: "发布时间" },
|
{ prop: "createTime", label: "发布时间" },
|
||||||
{ prop: "createTime", label: "阅读状态" },
|
{ prop: "isRead", label: "阅读状态" },
|
||||||
{ prop: "operation", label: "操作", fixed: "right" }
|
{ prop: "operation", label: "操作", fixed: "right" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user