Merge branch 'master' of http://gitea.sczysoft.com/ganzi/daofu-gov-pc
This commit is contained in:
commit
8207d882af
|
|
@ -59,6 +59,7 @@
|
|||
prop="performclassname"
|
||||
:resizable="true"
|
||||
label="组织名称"
|
||||
width="250"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -66,6 +67,7 @@
|
|||
:resizable="true"
|
||||
align="center"
|
||||
label="负责人"
|
||||
width="250"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="areaPathName" :resizable="true" label="所属地区">
|
||||
|
|
@ -73,7 +75,7 @@
|
|||
<el-table-column
|
||||
:resizable="true"
|
||||
align="center"
|
||||
width="250"
|
||||
width="300"
|
||||
label="操作"
|
||||
>
|
||||
<template #default="scope">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="props.form.workId ? '编辑事件' : '新增事件'"
|
||||
:titleName="props.form.workId ? '编辑' + props.tabsTitle : '新增' + props.tabsTitle"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
|
|
@ -186,6 +186,10 @@ const props = defineProps({
|
|||
typeId: {
|
||||
type: String,
|
||||
},
|
||||
tabsTitle:{
|
||||
type: String,
|
||||
default:"",
|
||||
}
|
||||
});
|
||||
const form = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
|
|
|
|||
|
|
@ -1,200 +0,0 @@
|
|||
<!-- 工作统计 -->
|
||||
<template>
|
||||
<div>
|
||||
<div class="h-layout space-between h-center">
|
||||
<div>
|
||||
<div class="h-layout">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||
>
|
||||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
<div class="tool-item">
|
||||
<svg-icon name="export" class="icon" />
|
||||
<span>导出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
ref="loading"
|
||||
class="table"
|
||||
v-loading="tableDataloading"
|
||||
:data="tableData"
|
||||
header-row-class-name="el-one-header"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" align="center" label="序号" width="80"/>
|
||||
<el-table-column prop="title" align="center" label="工作内容" />
|
||||
<el-table-column prop="startTime" align="center" label="开始时间" width="150"/>
|
||||
<el-table-column prop="endTime" align="center" label="结束时间" width="150"/>
|
||||
<el-table-column prop="chinaName" align="center" label="发布人" width="120"/>
|
||||
<el-table-column prop="postName" align="center" label="发布人岗位" width="150"/>
|
||||
<el-table-column
|
||||
:resizable="true"
|
||||
align="center"
|
||||
width="260"
|
||||
label="操作"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- <span
|
||||
class="operate"
|
||||
@click="
|
||||
(dialogVisible = true), (form = scope.row), (readonly = false)
|
||||
"
|
||||
>
|
||||
<svg-icon name="edit" class="icon"></svg-icon>
|
||||
<span class="edit">编辑</span>
|
||||
</span> -->
|
||||
<span
|
||||
class="operate"
|
||||
@click="
|
||||
(dialogVisible = true), (form = scope.row), (readonly = true)
|
||||
"
|
||||
>
|
||||
<svg-icon name="detail" class="icon"></svg-icon>
|
||||
<span class="detail">详情</span>
|
||||
</span>
|
||||
<span class="operate" @click="deletelist(scope.row)">
|
||||
<svg-icon name="delete" class="icon"></svg-icon>
|
||||
<span class="func">删除</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
background
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 新增 -->
|
||||
<Add
|
||||
:visible="dialogVisible"
|
||||
:form="form"
|
||||
:readonly="readonly"
|
||||
@close="onclone"
|
||||
:typeId="typeId"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import Add from "./Add.vue";
|
||||
import { sendWorkPage } from "@/api/Work";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
const props = defineProps({
|
||||
tabIndex: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
typeId:{
|
||||
type: String,
|
||||
default:''
|
||||
}
|
||||
});
|
||||
const typeId = ref('')
|
||||
const search = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
||||
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const tableData = ref([]);
|
||||
const getSendWorkPage = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
userId:userId.value,
|
||||
limit: pageSize.value,
|
||||
page: currentPage.value,
|
||||
typeId:typeId.value,
|
||||
};
|
||||
sendWorkPage(params).then((res: any) => {
|
||||
tableData.value = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
//新增弹窗
|
||||
const dialogVisible = ref(false);
|
||||
const form = ref({});
|
||||
const readonly = ref(false);
|
||||
//关闭新增弹窗
|
||||
const onclone = () => {
|
||||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
getList();
|
||||
};
|
||||
//删除
|
||||
const deletelist = (data)=>{
|
||||
console.log(data,'===>');
|
||||
// ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||
// confirmButtonText: "是",
|
||||
// cancelButtonText: "否",
|
||||
// type: "warning",
|
||||
// }).then(() => {
|
||||
// delOthequipment(id, userId.value).then((res: any) => {
|
||||
// if (res.code == 1) {
|
||||
// ElMessage.success({
|
||||
// message: "删除成功",
|
||||
// type: "success",
|
||||
// });
|
||||
// } else {
|
||||
// ElMessage.error({
|
||||
// message: res.message,
|
||||
// type: "error",
|
||||
// });
|
||||
// }
|
||||
// getSendWorkPage();
|
||||
// });
|
||||
// });
|
||||
|
||||
}
|
||||
const getList = ()=>{
|
||||
currentPage.value = 1;
|
||||
getSendWorkPage();
|
||||
}
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
watch(
|
||||
() => props.tabIndex,
|
||||
(val) => {
|
||||
typeId.value = props.typeId;
|
||||
getSendWorkPage();
|
||||
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.typeId,
|
||||
(val) => {
|
||||
getSendWorkPage();
|
||||
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -9,7 +9,94 @@
|
|||
<!-- <transition name="main" mode="out-in" appear>
|
||||
<component :is="tabs[tabIndex].compon" />
|
||||
</transition> -->
|
||||
<CG :tabIndex="tabIndex" :typeId="typeId"></CG>
|
||||
<!-- <CG :tabIndex="tabIndex" :typeId="typeId"></CG> -->
|
||||
<div class="h-layout space-between h-center">
|
||||
<div>
|
||||
<div class="h-layout">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||
>
|
||||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
<div class="tool-item">
|
||||
<svg-icon name="export" class="icon" />
|
||||
<span>导出</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
ref="loading"
|
||||
class="table"
|
||||
v-loading="tableDataloading"
|
||||
:data="tableData"
|
||||
header-row-class-name="el-one-header"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" align="center" label="序号" width="80"/>
|
||||
<el-table-column prop="title" align="center" label="工作内容" />
|
||||
<el-table-column prop="startTime" align="center" label="开始时间" width="150"/>
|
||||
<el-table-column prop="endTime" align="center" label="结束时间" width="150"/>
|
||||
<el-table-column prop="chinaName" align="center" label="发布人" width="120"/>
|
||||
<el-table-column prop="postName" align="center" label="发布人岗位" width="150"/>
|
||||
<el-table-column
|
||||
:resizable="true"
|
||||
align="center"
|
||||
width="260"
|
||||
label="操作"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- <span
|
||||
class="operate"
|
||||
@click="
|
||||
(dialogVisible = true), (form = scope.row), (readonly = false)
|
||||
"
|
||||
>
|
||||
<svg-icon name="edit" class="icon"></svg-icon>
|
||||
<span class="edit">编辑</span>
|
||||
</span> -->
|
||||
<span
|
||||
class="operate"
|
||||
@click="
|
||||
(dialogVisible = true), (form = scope.row), (readonly = true)
|
||||
"
|
||||
>
|
||||
<svg-icon name="detail" class="icon"></svg-icon>
|
||||
<span class="detail">详情</span>
|
||||
</span>
|
||||
<span class="operate" @click="deletelist(scope.row)">
|
||||
<svg-icon name="delete" class="icon"></svg-icon>
|
||||
<span class="func">删除</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
v-model:current-page.sync="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size.sync="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
background
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 新增 -->
|
||||
<Add
|
||||
:visible="dialogVisible"
|
||||
:form="form"
|
||||
:readonly="readonly"
|
||||
@close="onclone"
|
||||
:typeId="typeId"
|
||||
:tabsTitle="tabsTitle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -18,21 +105,31 @@
|
|||
import { onMounted, ref } from "vue";
|
||||
// import { ElMessageBox } from "element-plus";
|
||||
import { wkTypes } from "@/api/Work";
|
||||
import CG from "./components/cg.vue";
|
||||
// import CG from "./components/cg.vue";
|
||||
import Add from "./components/add.vue";
|
||||
import { sendWorkPage } from "@/api/Work";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
|
||||
const tabIndex = ref(0);
|
||||
const tabs = ref([
|
||||
{ typeName: "常规工作", sortId: 1, },
|
||||
]);
|
||||
const typeId = ref('');
|
||||
//弹窗标题
|
||||
const tabsTitle = ref('');
|
||||
//头部点击取id
|
||||
const clickRadio = ()=>{
|
||||
tabs.value.forEach(item => {
|
||||
if (item.sortId == tabIndex.value) {
|
||||
typeId.value = item.typeId
|
||||
tabsTitle.value = item.typeName;
|
||||
}
|
||||
|
||||
});
|
||||
getList()
|
||||
}
|
||||
//工作类型
|
||||
const getWkTypes = ()=>{
|
||||
|
|
@ -42,9 +139,76 @@ const getWkTypes = ()=>{
|
|||
wkTypes(params).then((res: any) => {
|
||||
tabs.value = res.data;
|
||||
typeId.value = res.data[0].typeId;
|
||||
tabsTitle.value = res.data[0].typeName;
|
||||
tabIndex.value = 1;
|
||||
getSendWorkPage();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const search = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
||||
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const tableData = ref([]);
|
||||
const getSendWorkPage = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
userId:userId.value,
|
||||
limit: pageSize.value,
|
||||
page: currentPage.value,
|
||||
typeId:typeId.value,
|
||||
};
|
||||
sendWorkPage(params).then((res: any) => {
|
||||
tableData.value = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
//新增弹窗
|
||||
const dialogVisible = ref(false);
|
||||
const form = ref({});
|
||||
const readonly = ref(false);
|
||||
//关闭新增弹窗
|
||||
const onclone = () => {
|
||||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
getList();
|
||||
};
|
||||
//删除
|
||||
const deletelist = (data)=>{
|
||||
console.log(data,'===>');
|
||||
// ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||
// confirmButtonText: "是",
|
||||
// cancelButtonText: "否",
|
||||
// type: "warning",
|
||||
// }).then(() => {
|
||||
// delOthequipment(id, userId.value).then((res: any) => {
|
||||
// if (res.code == 1) {
|
||||
// ElMessage.success({
|
||||
// message: "删除成功",
|
||||
// type: "success",
|
||||
// });
|
||||
// } else {
|
||||
// ElMessage.error({
|
||||
// message: res.message,
|
||||
// type: "error",
|
||||
// });
|
||||
// }
|
||||
// getSendWorkPage();
|
||||
// });
|
||||
// });
|
||||
|
||||
}
|
||||
const getList = ()=>{
|
||||
currentPage.value = 1;
|
||||
getSendWorkPage();
|
||||
}
|
||||
onMounted(() => {
|
||||
getWkTypes();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="props.form.dynamicsId ? '编辑事件' : '新增事件'"
|
||||
:titleName="props.form.dynamicsId ? '编辑' + props.tabsTitle : '新增' + props.tabsTitle"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
|
|
@ -162,6 +162,10 @@ const props = defineProps({
|
|||
typeId: {
|
||||
type: String,
|
||||
},
|
||||
tabsTitle:{
|
||||
type: String,
|
||||
default:"",
|
||||
}
|
||||
});
|
||||
const form = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@
|
|||
:readonly="readonly"
|
||||
@close="onclone"
|
||||
:typeId="typeId"
|
||||
:tabsTitle="tabsTitle"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -142,7 +143,7 @@
|
|||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import Add from "./components/Add.vue";
|
||||
import Add from "./components/add.vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { wkTypes,wkDynamicsPage } from "@/api/Work";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
|
@ -185,11 +186,14 @@ const getWkDynamicsPage = () => {
|
|||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
//弹窗标题
|
||||
const tabsTitle = ref('');
|
||||
//头部点击取id
|
||||
const clickRadio = ()=>{
|
||||
tabs.value.forEach(item => {
|
||||
if (item.sortId == tabIndex.value) {
|
||||
typeId.value = item.typeId;
|
||||
tabsTitle.value = item.typeName;
|
||||
}
|
||||
});
|
||||
getList()
|
||||
|
|
@ -209,7 +213,9 @@ const getWkTypes = ()=>{
|
|||
wkTypes(params).then((res: any) => {
|
||||
tabs.value = res.data;
|
||||
typeId.value = res.data[0].typeId;
|
||||
tabsTitle.value = res.data[0].typeName;
|
||||
tabIndex.value = 1;
|
||||
getWkDynamicsPage();
|
||||
});
|
||||
}
|
||||
//刷新
|
||||
|
|
@ -223,7 +229,6 @@ const deletelist = (data)=>{
|
|||
}
|
||||
onMounted(() => {
|
||||
getWkTypes();
|
||||
getWkDynamicsPage();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user