对接统计分析等
This commit is contained in:
parent
e8e04d9135
commit
c371a9f169
|
|
@ -376,7 +376,35 @@ export function saveUser(data) {
|
|||
params:params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*工作管理-分类型分页查看
|
||||
*/
|
||||
export function getWorkTypePage(params) {
|
||||
return request({
|
||||
url: `/admin/Sys/getWorkTypePage`,
|
||||
method: "GET",
|
||||
params:params,
|
||||
});
|
||||
}
|
||||
/**
|
||||
*工作管理-分类型新增-修改
|
||||
*/
|
||||
export function saveWorkType(params) {
|
||||
return request({
|
||||
url: `/admin/Sys/saveWorkType`,
|
||||
method: "POST",
|
||||
data:params,
|
||||
});
|
||||
}
|
||||
/**
|
||||
*工作管理-分类型删除
|
||||
*/
|
||||
export function delWorkType(params) {
|
||||
return request({
|
||||
url: `/admin/Sys/delWorkType/${params.typeId}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export function wkTypes(params) {
|
|||
});
|
||||
}
|
||||
/**
|
||||
*工作动态分页
|
||||
*新增工作动态
|
||||
*/
|
||||
export function wkDynamicsAdd(params) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -148,5 +148,33 @@ export function deleteEquip(data) {
|
|||
method: "POST",
|
||||
});
|
||||
}
|
||||
/**
|
||||
*查看指挥体系树形结构
|
||||
*/
|
||||
export function getCommandList() {
|
||||
return request({
|
||||
url: `/admin/commandUser/getCommandList`,
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
/**
|
||||
*指挥体系人员添加-修改
|
||||
*/
|
||||
export function saveCommandUser(params) {
|
||||
return request({
|
||||
url: `/admin/commandUser/saveCommandUser`,
|
||||
method: "POST",
|
||||
data:params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*指挥体系人员删除
|
||||
*/
|
||||
export function deleteCommandUser(params) {
|
||||
return request({
|
||||
url: `/admin/commandUser/deleteCommandUser/${params.ids}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
21
src/api/statistic.ts
Normal file
21
src/api/statistic.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import request from "@/utils/request";
|
||||
// 统计分析
|
||||
/**
|
||||
*查看人员类型统计
|
||||
*/
|
||||
export function personnelTypeStatistic() {
|
||||
return request({
|
||||
url: `/admin/statistic/personnelTypeStatistic`,
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
/**
|
||||
*查看户籍统计
|
||||
*/
|
||||
export function domicileStatistic() {
|
||||
return request({
|
||||
url: `/admin/statistic/domicileStatistic`,
|
||||
method: "GET",
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -58,6 +58,16 @@ export default {
|
|||
breadcrumb: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'jobtype',
|
||||
name: 'jobtype',
|
||||
component: () => import('@/views/system/base/job-type/index.vue'),
|
||||
meta: {
|
||||
icon: 'point',
|
||||
title: '工作管理',
|
||||
breadcrumb: true,
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
:horizontal="horizontal"
|
||||
:collapsable="collapsable"
|
||||
:label-style="style"
|
||||
:node-draggable="true"
|
||||
:node-draggable="false"
|
||||
:scalable="true"
|
||||
:only-one-node="onlyOneNode"
|
||||
:default-expand-level="2"
|
||||
|
|
@ -28,7 +28,6 @@
|
|||
<template v-slot="{ node }">
|
||||
<div class="tree-org-node__text node-label tree-div">
|
||||
<div>{{ node.label }}</div>
|
||||
<!-- <input type="text"> -->
|
||||
</div>
|
||||
</template>
|
||||
</vue3-tree-org>
|
||||
|
|
@ -44,39 +43,13 @@
|
|||
|
||||
<script setup lang='ts'>
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
// import { getEmergencyUserTree, saveEmergencyUser, delEmergencyUser } from "@/api/emergency";
|
||||
import { getCommandList, saveCommandUser, deleteCommandUser } from "@/api/emergency";
|
||||
import { getUUID } from "@/utils/common";
|
||||
import { ElMessage } from "element-plus";
|
||||
const dataList = ref({
|
||||
id: getUUID(),
|
||||
label: "道孚县鲜水镇",
|
||||
children: [
|
||||
{
|
||||
id: 2,
|
||||
label: "街道",
|
||||
style: { color: "#fff", background: "#108ffe" },
|
||||
children: [
|
||||
{ id: 6, label: "办公室" },
|
||||
{ id: 8, label: "安居办" },
|
||||
{ id: 10, label: "规划办" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: "应急",
|
||||
children: [
|
||||
{
|
||||
id: 11,
|
||||
label: "应急一部",
|
||||
children: [
|
||||
{ id: 15, label: "应急一部" },
|
||||
{ id: 16, label: "应急二部" },
|
||||
],
|
||||
},
|
||||
{ id: 12, label: "应急二部" },
|
||||
],
|
||||
},
|
||||
],
|
||||
children: [],
|
||||
});
|
||||
const horizontal = ref(false);
|
||||
const collapsable = ref(true);
|
||||
|
|
@ -89,9 +62,13 @@ const style = reactive({
|
|||
height: "50%",
|
||||
});
|
||||
const props = reactive({
|
||||
id: "id",
|
||||
label: "label",
|
||||
id: "commandUserId",
|
||||
pid: "superId",
|
||||
label: "name",
|
||||
children: "children",
|
||||
mobile: "mobile",
|
||||
imgId: "imgId",
|
||||
imgUrl: "imgUrl",
|
||||
});
|
||||
const defineMenus = ref([
|
||||
{ name: "新增", command: "add" },
|
||||
|
|
@ -112,72 +89,73 @@ const addModifyData = ref([]);
|
|||
const onMenus = ({ node, command }) => {};
|
||||
const restore = () => {};
|
||||
const filterNodeMethod = (value, data) => {
|
||||
console.log(value, data);
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
//提交
|
||||
const click = () => {
|
||||
addModifyData.value = [...new Set(addModifyData.value)];
|
||||
let addList = []
|
||||
//新增
|
||||
addModifyData.value.forEach((item) => {
|
||||
console.log(item);
|
||||
let emergencyUserId = "";
|
||||
if (item.newNode == true) {
|
||||
emergencyUserId = getUUID();
|
||||
} else {
|
||||
emergencyUserId = item.emergencyUserId;
|
||||
}
|
||||
// let commandUserId = "";
|
||||
// if (item.newNode == true) {
|
||||
// commandUserId = getUUID();
|
||||
// } else {
|
||||
// commandUserId = item.commandUserId;
|
||||
// }
|
||||
let params = {
|
||||
emergencyUserId: emergencyUserId,
|
||||
commandUserId: item.commandUserId,
|
||||
name: item.name,
|
||||
superId: item.superId,
|
||||
};
|
||||
console.log(params, "params====>");
|
||||
|
||||
// saveEmergencyUser(params).then((res: any) => {
|
||||
// });
|
||||
addList.push(params)
|
||||
});
|
||||
saveCommandUser(addList).then((res: any) => {
|
||||
});
|
||||
// 删除
|
||||
deleteData.value.forEach((item) => {
|
||||
deleteCommandUser({ ids: item.commandUserId }).then((res: any) => {
|
||||
});
|
||||
});
|
||||
//删除
|
||||
// deleteData.value.forEach(item => {
|
||||
// delEmergencyUser({ emergencyUserId: item.emergencyUserId }).then((res: any) => {
|
||||
// });
|
||||
// })
|
||||
|
||||
// setTimeout(() => {
|
||||
// ElMessage({
|
||||
// message: '修改成功',
|
||||
// type: 'success',
|
||||
// })
|
||||
// deleteData.value = [];
|
||||
// addModifyData.value = [];
|
||||
// getEmergencyUserTrees();
|
||||
// }, 2000)
|
||||
setTimeout(() => {
|
||||
ElMessage({
|
||||
message: '修改成功',
|
||||
type: 'success',
|
||||
})
|
||||
deleteData.value = [];
|
||||
addModifyData.value = [];
|
||||
getCommandLists();
|
||||
}, 2000)
|
||||
};
|
||||
//节点失去焦点-添加入增加修改数组
|
||||
const nodeBlur = (e, data) => {
|
||||
console.log(e, data, "e, data=>");
|
||||
|
||||
data.commandUserId = getUUID();
|
||||
addModifyData.value.push(data);
|
||||
console.log(addModifyData.value, "addModifyData.value==>");
|
||||
console.log(dataList.value, "data===>");
|
||||
};
|
||||
const changeinput = (e) => {
|
||||
addModifyData.value.push({
|
||||
name:e.label,
|
||||
superId:e.pid,
|
||||
commandUserId:e.id,
|
||||
mobile:e.mobile,
|
||||
});
|
||||
};
|
||||
//添加入删除节点数组
|
||||
const nodeDelete = (e) => {
|
||||
deleteData.value.push(e);
|
||||
console.log(dataList.value, "data===>");
|
||||
};
|
||||
//获取应急工作处理领导小组树形
|
||||
const getEmergencyUserTrees = () => {
|
||||
// getEmergencyUserTree().then((res: any) => {
|
||||
// console.log(data.value, ' data.value ');
|
||||
// if (res.code == 1) {
|
||||
// dataList.value = res.data[0]
|
||||
// }
|
||||
// });
|
||||
const getCommandLists = () => {
|
||||
getCommandList().then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
dataList.value = res.data[0];
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getEmergencyUserTrees();
|
||||
getCommandLists();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,46 +24,64 @@
|
|||
border
|
||||
>
|
||||
<el-table-column
|
||||
prop="cName"
|
||||
prop="orgName"
|
||||
align="center"
|
||||
:resizable="true"
|
||||
label="村名"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="本地户籍">
|
||||
<el-table-column prop="localNum" :resizable="true" align="center" label="本地户籍">
|
||||
</el-table-column>
|
||||
<el-table-column prop="yj" :resizable="true" align="center" label="常驻人口">
|
||||
<el-table-column prop="permanentNum" :resizable="true" align="center" label="常驻人口">
|
||||
</el-table-column>
|
||||
<el-table-column prop="yj" :resizable="true" align="center" label="流动人口">
|
||||
<el-table-column prop="flowingNum" :resizable="true" align="center" label="流动人口">
|
||||
</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>
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
background
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
|
||||
import { domicileStatistic } from "@/api/statistic";
|
||||
const search = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
const tableData = ref([{ cName: "xxx村名" }, { cName: "xxx村名" }]);
|
||||
const tableData = ref([]);
|
||||
const tableDataloading = ref(false);
|
||||
const getDomicileStatistic = () => {
|
||||
tableDataloading.value = true;
|
||||
// let params = {
|
||||
// limit: pageSize.value,
|
||||
// page: currentPage.value,
|
||||
// };
|
||||
domicileStatistic().then((res: any) => {
|
||||
tableData.value = res.data;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getDomicileStatistic();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -23,54 +23,76 @@
|
|||
header-row-class-name="el-one-header"
|
||||
border
|
||||
>
|
||||
<el-table-column prop="cName" :resizable="true" align="center" label="村名">
|
||||
<el-table-column
|
||||
prop="orgName"
|
||||
:resizable="true"
|
||||
align="center"
|
||||
label="村名"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="常住人口">
|
||||
<el-table-column prop="poverty" :resizable="true" align="center" label="贫困户">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="脱贫户">
|
||||
<el-table-column prop="student" :resizable="true" align="center" label="在校生">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="新生儿">
|
||||
<el-table-column prop="disabled" :resizable="true" align="center" label="残疾人">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="在校生">
|
||||
<el-table-column prop="lowGuarantees" :resizable="true" align="center" label="低保户">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="残疾人">
|
||||
<el-table-column prop="fiveGuarantees" :resizable="true" align="center" label="五保户">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="低保户">
|
||||
<el-table-column prop="partyMember" :resizable="true" align="center" label="党员">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="五保户">
|
||||
<el-table-column prop="villageCadre" :resizable="true" align="center" label="村组干部">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="党员">
|
||||
</el-table-column>
|
||||
<el-table-column prop="db" :resizable="true" align="center" label="村组干部">
|
||||
<el-table-column prop="other" :resizable="true" align="center" label="其他">
|
||||
</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>
|
||||
class="pagination"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
v-model:current-page="currentPage"
|
||||
:page-sizes="[10, 15, 20, 30]"
|
||||
v-model:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
background
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import { personnelTypeStatistic } from "@/api/statistic";
|
||||
|
||||
const search = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
const tableData = ref([{ cName: "xxx村名" }, { cName: "xxx村名" }]);
|
||||
const tableData = ref([]);
|
||||
const tableDataloading = ref(false);
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
// let params = {
|
||||
// limit: pageSize.value,
|
||||
// page: currentPage.value,
|
||||
// };
|
||||
personnelTypeStatistic().then((res: any) => {
|
||||
tableData.value = res.data;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -34,40 +34,37 @@ const tabs = ref([
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.percentage-content {
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.rg {
|
||||
padding: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 0px 6px rgba(0, 120, 255, 0.1);
|
||||
border-radius: 6px;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px;
|
||||
|
||||
:deep(.el-radio-button__inner) {
|
||||
min-width: 150px;
|
||||
flex-direction: column;
|
||||
.rg {
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 6px rgb(0 120 255 / 10%);
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 10px;
|
||||
:deep(.el-radio-button__inner) {
|
||||
min-width: 150px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 0.26042vw;
|
||||
box-shadow: 0 0 0.41667vw 0 rgba(8, 33, 85, 0.1);
|
||||
padding: 0.83333vw;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden !important;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 0.26042vw;
|
||||
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
|
||||
padding: 0.83333vw;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden !important;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
134
src/views/system/base/job-type/add.vue
Normal file
134
src/views/system/base/job-type/add.vue
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
|
||||
<template>
|
||||
<BaseDialog
|
||||
:dialogVisible="props.visible"
|
||||
@close="onclone"
|
||||
:titleName="
|
||||
readonly ? '工作类型详情' : titleName
|
||||
"
|
||||
width="50%"
|
||||
@onSubmit="handleSubmit"
|
||||
:footerclosed="true"
|
||||
:diafooter="true"
|
||||
:footerkeepnaem="props.readonly ? false : true"
|
||||
>
|
||||
<div class="detailForm-content">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
label-position="right"
|
||||
label-width="100"
|
||||
:disabled="readonly"
|
||||
:rules="ruleForm"
|
||||
:model="addPostFactorForm"
|
||||
>
|
||||
<el-form-item label="类型名称:" prop="typeName">
|
||||
<el-input
|
||||
placeholder="类型名称"
|
||||
v-model="addPostFactorForm.typeName"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类:" prop="classify">
|
||||
<el-select
|
||||
v-model="addPostFactorForm.classify"
|
||||
clearable
|
||||
placeholder="请选择分类"
|
||||
>
|
||||
<el-option label="工作" :value="1"> </el-option>
|
||||
<el-option label="工作动态" :value="2"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序:" prop="sortId">
|
||||
<el-input-number placeholder="请输入排序" v-model="addPostFactorForm.sortId" :min="1"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</BaseDialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" >
|
||||
import { reactive, ref, onMounted, watch } from "vue";
|
||||
import { ElMessage, FormInstance, FormRules } from "element-plus";
|
||||
import { saveWorkType } from "@/api/Sys";
|
||||
|
||||
const titleName = ref('新增类型');
|
||||
const formRef = ref<FormInstance>();
|
||||
const ruleForm = reactive<FormRules>({
|
||||
typeName: [
|
||||
{ required: true, message: "请输入类型名称", trigger: "blur" },
|
||||
],
|
||||
sortId:[{ required: true, message: "输入排序", trigger: "blur" }],
|
||||
classify:[{ required: true, message: "选择分类排序", trigger: "blur" }],
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
form: Object,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const addPostFactorForm = ref(<any>{});
|
||||
const emits = defineEmits(["close", "onSubmit"]);
|
||||
|
||||
//保存并退出
|
||||
const handleSubmit = () => {
|
||||
formRef.value?.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(addPostFactorForm.value);
|
||||
let params = {
|
||||
...addPostFactorForm.value
|
||||
}
|
||||
console.log(params,'params===>');
|
||||
saveWorkType(params).then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
ElMessage.success({
|
||||
message: "保存成功",
|
||||
type: "success",
|
||||
});
|
||||
onclone();
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
//关闭弹窗
|
||||
const onclone = () => {
|
||||
emits("close");
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.form,
|
||||
(val) => {
|
||||
if (val) {
|
||||
if (!props.visible) return;
|
||||
addPostFactorForm.value = val;
|
||||
}
|
||||
if (val.typeId) {
|
||||
titleName.value = '修改类型'
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detailForm-content {
|
||||
margin-right: 30px;
|
||||
}
|
||||
:deep(.el-form) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
:deep(.el-form-item) {
|
||||
width: 47%;
|
||||
}
|
||||
</style>
|
||||
228
src/views/system/base/job-type/index.vue
Normal file
228
src/views/system/base/job-type/index.vue
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
<template>
|
||||
<div class="percentage-content">
|
||||
<div class="content">
|
||||
<div class="h-layout space-between h-center">
|
||||
<div>
|
||||
<div class="h-layout h-center">
|
||||
<div class="tool-item" @click="getList">
|
||||
<svg-icon name="refurbish" class="icon" />
|
||||
<span>刷新</span>
|
||||
</div>
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="(dialogVisible = true), (form = {}), (readonly = false)"
|
||||
>
|
||||
<svg-icon name="add" class="icon" />
|
||||
<span>新增</span>
|
||||
</div>
|
||||
<div class="label-select filter-tab">
|
||||
<label>预案类型</label>
|
||||
<el-select
|
||||
v-model="search.classify"
|
||||
@change="getList"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option label="工作" :value="1"> </el-option>
|
||||
<el-option label="工作动态" :value="2"> </el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 30%;">
|
||||
<div>
|
||||
<el-input
|
||||
v-model="search.typeName"
|
||||
@keydown.enter.native="getList"
|
||||
placeholder="请输入工作类型"
|
||||
class="search-input"
|
||||
>
|
||||
<template #append>
|
||||
<span @click="getList" class="search-bottom">
|
||||
<svg-icon name="search" class="icon_class" />
|
||||
<span>搜索</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
ref="loading"
|
||||
class="table"
|
||||
v-loading="tableDataloading"
|
||||
:data="tableData"
|
||||
header-row-class-name="el-one-header"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:resizable="true"
|
||||
width="80"
|
||||
label="序列"
|
||||
type="index"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.$index + 1 + (currentPage - 1) * pageSize }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="typeName"
|
||||
:resizable="true"
|
||||
label="工作类型"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:resizable="true"
|
||||
align="center"
|
||||
width="300"
|
||||
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="clickDelete(scope.row.typeId)">
|
||||
<svg-icon name="delete" class="icon"></svg-icon>
|
||||
<span class="delete">删除</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
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>
|
||||
</div>
|
||||
<!-- 新增/修改 -->
|
||||
<Add
|
||||
:visible="dialogVisible"
|
||||
:form="form"
|
||||
:readonly="readonly"
|
||||
@close="onclone"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
|
||||
import { getWorkTypePage, delWorkType } from "@/api/Sys";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import Add from "./add.vue";
|
||||
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const user = ref(JSON.parse(userStore.userInfo));
|
||||
const userId = ref(user.value.userId);
|
||||
|
||||
const search = ref({
|
||||
typeName: "",
|
||||
classify: 1,
|
||||
});
|
||||
const tableData = ref([]);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(0);
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const form = ref({});
|
||||
const readonly = ref(false);
|
||||
|
||||
//获取列表
|
||||
const tableDataloading = ref(false);
|
||||
const getList = () => {
|
||||
tableDataloading.value = true;
|
||||
let params = {
|
||||
typeName: search.value.typeName,
|
||||
limit: pageSize.value,
|
||||
page: currentPage.value,
|
||||
classify: search.value.classify,
|
||||
};
|
||||
getWorkTypePage(params).then((res: any) => {
|
||||
console.log(res, "res===>");
|
||||
|
||||
tableData.value = res.data.list;
|
||||
total.value = res.data.total;
|
||||
tableDataloading.value = false;
|
||||
});
|
||||
};
|
||||
const clickDelete = (id) => {
|
||||
ElMessageBox.confirm("是否确认删除?", "提示", {
|
||||
confirmButtonText: "是",
|
||||
cancelButtonText: "否",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
delWorkType({typeId:id}).then((res: any) => {
|
||||
if (res.code == 1) {
|
||||
ElMessage.success({
|
||||
message: "删除成功",
|
||||
type: "success",
|
||||
});
|
||||
} else {
|
||||
ElMessage.error({
|
||||
message: res.message,
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
getList();
|
||||
});
|
||||
});
|
||||
};
|
||||
//关闭新增弹窗
|
||||
const onclone = () => {
|
||||
dialogVisible.value = false;
|
||||
form.value = {};
|
||||
getList();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 0.26042vw;
|
||||
box-shadow: 0 0 0.41667vw 0 rgb(8 33 85 / 10%);
|
||||
height: 100%;
|
||||
padding: 0.83333vw;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden !important;
|
||||
box-sizing: border-box;
|
||||
.table {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -61,15 +61,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="authUserName" :resizable="true" label="登录用户">
|
||||
</el-table-column>
|
||||
<el-table-column prop="authOptTime" :resizable="true" label="登录时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="authOptIp"
|
||||
:resizable="true"
|
||||
align="center"
|
||||
label="IP地址"
|
||||
width="200"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="authOptTime" :resizable="true" label="登录时间">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user