437 changed files with 71698 additions and 255 deletions
@ -0,0 +1,45 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
import { useTagsViewStore } from "@/store/modules/tagsView"; |
||||
|
|
||||
|
const tagsViewStore = useTagsViewStore(); |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<section class="app-main"> |
||||
|
<router-view v-slot="{ Component, route }"> |
||||
|
<transition name="router-fade" mode="out-in"> |
||||
|
<keep-alive :include="tagsViewStore.cachedViews"> |
||||
|
<component :is="Component" :key="route.fullPath" /> |
||||
|
</keep-alive> |
||||
|
</transition> |
||||
|
</router-view> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.app-main { |
||||
|
position: relative; |
||||
|
width: 100%; |
||||
|
|
||||
|
/* 50= navbar 50 */ |
||||
|
min-height: calc(100vh - 50px); |
||||
|
overflow: hidden; |
||||
|
background-color: var(--el-bg-color-page); |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
padding-top: 50px; |
||||
|
} |
||||
|
|
||||
|
.hasTagsView { |
||||
|
.app-main { |
||||
|
/* 84 = navbar + tags-view = 50 + 34 */ |
||||
|
min-height: calc(100vh - 84px); |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
min-height: 100vh; |
||||
|
padding-top: 84px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,45 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
import { useTagsViewStore } from "@/store/modules/tagsView"; |
||||
|
|
||||
|
const tagsViewStore = useTagsViewStore(); |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<section class="app-main"> |
||||
|
<router-view v-slot="{ Component, route }"> |
||||
|
<transition name="router-fade" mode="out-in"> |
||||
|
<keep-alive :include="tagsViewStore.cachedViews"> |
||||
|
<component :is="Component" :key="route.fullPath" /> |
||||
|
</keep-alive> |
||||
|
</transition> |
||||
|
</router-view> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.app-main { |
||||
|
position: relative; |
||||
|
width: 100%; |
||||
|
|
||||
|
/* 50= navbar 50 */ |
||||
|
min-height: calc(100vh - 50px); |
||||
|
overflow: hidden; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
padding-top: 50px; |
||||
|
} |
||||
|
|
||||
|
.hasTagsView { |
||||
|
.app-main { |
||||
|
/* 84 = navbar + tags-view = 50 + 34 */ |
||||
|
min-height: calc(100vh - 84px); |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
min-height: 100vh; |
||||
|
padding-top: 84px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,45 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
import { useTagsViewStore } from "@/store/modules/tagsView"; |
||||
|
|
||||
|
const tagsViewStore = useTagsViewStore(); |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<section class="app-main"> |
||||
|
<router-view v-slot="{ Component, route }"> |
||||
|
<transition name="router-fade" mode="out-in"> |
||||
|
<keep-alive :include="tagsViewStore.cachedViews"> |
||||
|
<component :is="Component" :key="route.fullPath" /> |
||||
|
</keep-alive> |
||||
|
</transition> |
||||
|
</router-view> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.app-main { |
||||
|
position: relative; |
||||
|
width: 100%; |
||||
|
|
||||
|
/* 50= navbar 50 */ |
||||
|
min-height: calc(100vh - 50px); |
||||
|
overflow: hidden; |
||||
|
background-color: var(--el-bg-color-page); |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
padding-top: 50px; |
||||
|
} |
||||
|
|
||||
|
.hasTagsView { |
||||
|
.app-main { |
||||
|
/* 84 = navbar + tags-view = 50 + 34 */ |
||||
|
min-height: calc(100vh - 84px); |
||||
|
} |
||||
|
|
||||
|
.fixed-header + .app-main { |
||||
|
min-height: 100vh; |
||||
|
padding-top: 84px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
bca |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff; |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff; |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff; |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff; |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,181 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
background-color:#fff; |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,180 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,180 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,180 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':''','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,180 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,180 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span> |
||||
|
<el-form-item label="问题:" class="aaa" style="font-size:100px;"> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="问题" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" > |
||||
|
<el-table-column type="selection"/> |
||||
|
<el-table-column prop="name" label="问题" /> |
||||
|
<el-table-column prop="sex" label="提问人" /> |
||||
|
<el-table-column prop="age" label="阅读量" /> |
||||
|
<el-table-column prop="abe" label="赞" /> |
||||
|
<el-table-column prop="ade" label="踩" /> |
||||
|
<el-table-column prop="age" label="评论" /> |
||||
|
<el-table-column prop="age" label="回答人数" /> |
||||
|
<el-table-column prop="abc" label="状态" width="120"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="num" label="时间"/> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<div class="button-container"> |
||||
|
<el-button type="success" size="default" class="button-margin" @click="handleEdit(row)" |
||||
|
>查看答案列表</el-button |
||||
|
> |
||||
|
<span> |
||||
|
<el-button type="danger" size="default" class="button-margin" |
||||
|
>下架</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<div class="ooo"> |
||||
|
<el-button type="danger" size="default" class="button-margin" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild:any) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "答案列表"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
position: absolute; |
||||
|
left: 1350px; |
||||
|
top: 0px; |
||||
|
margin: 10px 0; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 10px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
.button-container { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; /* 居中对齐 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,17 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-28 11:39:33 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import cc from "./cc.vue" |
||||
|
</script> |
||||
|
<template> |
||||
|
<div> |
||||
|
<cc></cc> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
* { |
||||
|
background-color:#fff; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,16 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-28 11:39:33 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import cc from "./cc.vue" |
||||
|
</script> |
||||
|
<template> |
||||
|
<cc></cc> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
* { |
||||
|
background-color:#fff; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,256 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.id |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
data.studentInfo = data.studentInfo.filter( |
||||
|
(item) => !multipleSelection.value.includes(item) |
||||
|
); |
||||
|
multipleSelection.value = []; // 清除选择 |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
const handleSave=(formData)=> { |
||||
|
formData.id = this.studentInfo.length + 1; //生成唯一ID |
||||
|
data.studentInfo.push(formData); // 将新数据添加到阵列 |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,252 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.id |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
data.studentInfo = data.studentInfo.filter( |
||||
|
(item) => !multipleSelection.value.includes(item) |
||||
|
); |
||||
|
multipleSelection.value = []; // 清除选择 |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,249 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.id |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,249 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.idF |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,249 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.id |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
const handleSelectionChange=(val)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,247 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow=(val)=> { |
||||
|
data.studentInfo.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow=(val)=> { |
||||
|
let index = data.studentInfo.findIndex( |
||||
|
(item, index) => item.id === val.id |
||||
|
); |
||||
|
data.studentInfo.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭详情弹窗 |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,237 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
// 添加行 |
||||
|
// 关闭详情弹窗 |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,237 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
// 关闭详情弹窗 |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,235 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const handleImageUploaded = (imageUrlFromChild) => { |
||||
|
// 将传递的图片数据存储到状态中 |
||||
|
imageUrl.value = imageUrlFromChild; |
||||
|
}; |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,229 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const filterTableData = computed(() => |
||||
|
data.studentInfo.filter( |
||||
|
(item) => !searchName.value || item.name.includes(searchName.value) |
||||
|
) |
||||
|
); |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
method.handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val:any)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val:any)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
handleSure(val:any); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val:any)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,224 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
handleSure(val); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val:any)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,223 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
const handleSure=(val:any)=> { |
||||
|
this.dialogVisible = false; |
||||
|
const index = data.studentInfo.findIndex((item) => item.id === val.id); |
||||
|
data.studentInfo.splice(index, 1); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,218 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,217 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
@add-row = "addRow" |
||||
|
@edit-row="editRow" |
||||
|
@image-uploaded="handleImageUploaded" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,215 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
:array-num="studentInfo.length" |
||||
|
|
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model:dialogShow="dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model:dialogShow="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,200 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive{ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
:data="studentInfo" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,212 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,212 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" :value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,212 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" :value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" :value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,212 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button |
||||
|
> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,212 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit" |
||||
|
>人数</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit(row)" |
||||
|
>人数</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit(row)" |
||||
|
>人数</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const =(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,213 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div class="box"> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNewac">添加</el-button> |
||||
|
<el-button type="warning" :icon="Star" circle size="large"><el-icon><RefreshRight /></el-icon></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" style="width: 50"> |
||||
|
<el-select v-model="form.region" placeholder="请选分厂" size="large"> |
||||
|
<el-option label="请选分厂" value="0"></el-option> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.section" placeholder="请选工段" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.position" placeholder="请选职务" size="large"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label=""> |
||||
|
<el-select v-model="form.column" placeholder="请选栏目" size="large"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input v-model="searchName" style="width: 170px" placeholder="请输入题目" size="large"></el-input> |
||||
|
<el-button type="success" style="width: 80px" size="large" @click="getUserList">查询</el-button> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="考试名称" width="250" /> |
||||
|
<el-table-column prop="sex" label="归属" width="100" /> |
||||
|
<el-table-column prop="age" label="考试范围" /> |
||||
|
<el-table-column prop="num" label="考试时长" width="100"/> |
||||
|
<el-table-column prop="abc" label="考题总数"/> |
||||
|
<el-table-column prop="abg" label="及格线"/> |
||||
|
<el-table-column prop="acd" label="开始&结束"/> |
||||
|
<el-table-column prop="acc" label="发起人"/> |
||||
|
<el-table-column prop="ace" label="创建时间"/> |
||||
|
<el-table-column prop="acf" label="状态"> |
||||
|
<template #default="row"> |
||||
|
<el-switch v-model="row.row.status" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="acg" label="考试人数"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button class="new_btn" type="primary" size="large" @click="handleEdit(row)" |
||||
|
>人数</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="200"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="danger" size="LARGE" @click="handleDel(row)" |
||||
|
>结束考试</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model="data.dialogShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lane="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
// eslint-disable-next-line vue/no-reserved-component-names |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
}); |
||||
|
const form=reactive({ |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}) |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "查看"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
*{ |
||||
|
font-weight: bolder; |
||||
|
font-size:15px; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th) { |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,237 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNew" |
||||
|
>新增</el-button |
||||
|
> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.region" placeholder="请选分厂"> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large" style="width: 50"> |
||||
|
<el-select v-model="data.form.section" placeholder="请选工段"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.position" placeholder="请选职务"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.column" placeholder="请选栏目"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="请输入题目" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 100px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
stripe |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="文章标题" width="650" /> |
||||
|
<el-table-column prop="sex" label="所属栏目" width="100" /> |
||||
|
<el-table-column prop="age" label="可见范围" width="100"/> |
||||
|
<el-table-column prop="num" label="访问数据" width="440" /> |
||||
|
<el-table-column prop="abc" label="状态" width="70"> |
||||
|
<template #default="row"> |
||||
|
<el-switch |
||||
|
v-model="row.row.status" |
||||
|
:active-icon="Check" |
||||
|
:inactive-icon="Close" |
||||
|
@click="handleDelac"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="success" size="large" @click="handleEdit(row)" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button type="danger" size="large" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model:data.dialogShow="data.dialogShow" |
||||
|
:row-info="data.rowInfo" |
||||
|
/> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import { Check, Close } from '@element-plus/icons-vue' |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
|
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
const handleDelac=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定启用这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-size: 15px; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,237 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<div> |
||||
|
<el-button type="danger" class="button-margin" size="large" @click="handleBatchDelete">批量删除</el-button> |
||||
|
<el-button class="new_btn" type="success" size="large" @click="handleNew" |
||||
|
>新增</el-button |
||||
|
> |
||||
|
<el-button type="warning" circle size="large" |
||||
|
><el-icon><RefreshRight /></el-icon |
||||
|
></el-button> |
||||
|
<span class="aaa"> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.region" placeholder="请选分厂"> |
||||
|
<el-option label="甲醇分厂" value="1"></el-option> |
||||
|
<el-option label="化产分厂" value="2"></el-option> |
||||
|
<el-option label="动力分厂" value="3"></el-option> |
||||
|
<el-option label="机焦车间" value="4"></el-option> |
||||
|
<el-option label="质检中心" value="5"></el-option> |
||||
|
<el-option label="安环部" value="6"></el-option> |
||||
|
<el-option label="备煤车间" value="7"></el-option> |
||||
|
<el-option label="保卫部" value="8"></el-option> |
||||
|
<el-option label="企管部" value="9"></el-option> |
||||
|
<el-option label="高管" value="10"></el-option> |
||||
|
<el-option label="综合办" value="11"></el-option> |
||||
|
<el-option label="人力资源部" value="12"></el-option> |
||||
|
<el-option label="财务部" value="13"></el-option> |
||||
|
<el-option label="营销部" value="14"></el-option> |
||||
|
<el-option label="生产部" value="15"></el-option> |
||||
|
<el-option label="仓储中心" value="16"></el-option> |
||||
|
<el-option label="物流中心" value="17"></el-option> |
||||
|
<el-option label="办公室" value="18"></el-option> |
||||
|
<el-option label="审计监察部" value="19"></el-option> |
||||
|
<el-option label="法律事务部" value="20"></el-option> |
||||
|
<el-option label="财务部" value="21"></el-option> |
||||
|
<el-option label="供应部" value="22"></el-option> |
||||
|
<el-option label="销售部" value="23"></el-option> |
||||
|
<el-option label="生产计划部" value="24"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large" style="width: 50"> |
||||
|
<el-select v-model="data.form.section" placeholder="请选工段"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.position" placeholder="请选职务"> </el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="" size="large"> |
||||
|
<el-select v-model="data.form.column" placeholder="请选栏目"> |
||||
|
<el-option label="请选栏目" value="0"></el-option> |
||||
|
<el-option label="流程制度" value="1"></el-option> |
||||
|
<el-option label="工艺技术" value="2"></el-option> |
||||
|
<el-option label="设备管理" value="3"></el-option> |
||||
|
<el-option label="仪控仪表" value="4"></el-option> |
||||
|
<el-option label="机电维修" value="5"></el-option> |
||||
|
<el-option label="安全生产" value="6"></el-option> |
||||
|
<el-option label="质量管理" value="7"></el-option> |
||||
|
<el-option label="财务管理" value="8"></el-option> |
||||
|
<el-option label="人力资源" value="9"></el-option> |
||||
|
<el-option label="仓储物流" value="10"></el-option> |
||||
|
<el-option label="营销采购" value="11"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-input |
||||
|
v-model="searchName" |
||||
|
style="width: 170px" |
||||
|
placeholder="请输入题目" |
||||
|
size="large" |
||||
|
></el-input> |
||||
|
<el-button type="success" style="width: 100px" size="large" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
</span> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
:header-cell-style="{'width':'100%','background':'#F2F2F2','text-align':'center'}" |
||||
|
stripe |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" /> |
||||
|
<el-table-column prop="name" label="文章标题" width="650" /> |
||||
|
<el-table-column prop="sex" label="所属栏目" width="100" /> |
||||
|
<el-table-column prop="age" label="可见范围" width="100"/> |
||||
|
<el-table-column prop="num" label="访问数据" width="440" /> |
||||
|
<el-table-column prop="abc" label="状态" width="70"> |
||||
|
<template #default="row"> |
||||
|
<el-switch |
||||
|
v-model="row.row.status" |
||||
|
:active-icon="Check" |
||||
|
:inactive-icon="Close" |
||||
|
@click="handleDelac"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="success" size="large" @click="handleEdit(row)" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button type="danger" size="large" @click="handleDel(row)" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<!-- 新建/编辑弹框 --> |
||||
|
<Dialog |
||||
|
v-if="data.dialogShow" |
||||
|
v-model:data.dialogShow="data.dialogShow" |
||||
|
:row-info="data.rowInfo" |
||||
|
/> |
||||
|
<!-- 详情弹窗 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, ref, toRefs, computed, onMounted } from "vue"; |
||||
|
import { countdownEmits, ElMessageBox, ElTable } from "element-plus"; |
||||
|
import { Timer } from "@element-plus/icons-vue"; |
||||
|
import { Check, Close } from '@element-plus/icons-vue' |
||||
|
import axios from "axios"; // 导入公理函数库 |
||||
|
import Dialog from "./dialog.vue"; |
||||
|
const data = reactive({ |
||||
|
dialogShow: false, // 新增/编辑弹框 |
||||
|
rowInfo: {}, // 新增/编辑的数据 |
||||
|
title: "", // 是新建还是修改 |
||||
|
queryInfo:{ |
||||
|
query:'', |
||||
|
pagenum:1, |
||||
|
pagesize:'', |
||||
|
}, |
||||
|
form: { |
||||
|
name: "", |
||||
|
region: "", |
||||
|
date1: "", |
||||
|
date2: "", |
||||
|
delivery: false, |
||||
|
type: [], |
||||
|
resource: "", |
||||
|
desc: "", |
||||
|
section: "", |
||||
|
position: "", |
||||
|
column: "", |
||||
|
}, |
||||
|
studentInfo: {}, |
||||
|
}); |
||||
|
const imageUrl = ref(''); |
||||
|
// 处理子组件传递的图片数据 |
||||
|
const jokeMes = ref([]) // 表格数据 |
||||
|
const temJokeMes = ref([]) // 临时表格数据 |
||||
|
const searchName = ref(""); // 用于查询的输入值 |
||||
|
|
||||
|
const multipleSelection = ref([]); |
||||
|
const handleNew=()=> { |
||||
|
data.title = "新增"; |
||||
|
data.rowInfo = {}; |
||||
|
data.dialogShow = true; |
||||
|
} |
||||
|
const handleEdit=(val:any)=> { |
||||
|
data.title = "修改"; |
||||
|
data.dialogShow = true; |
||||
|
data.rowInfo = val; |
||||
|
} |
||||
|
const handleDel=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
// 添加行 |
||||
|
const handleSelectionChange=(val:any)=> { |
||||
|
multipleSelection.value = val; |
||||
|
} |
||||
|
const handleBatchDelete=()=> { |
||||
|
if (multipleSelection.value.length === 0) { |
||||
|
ElMessageBox.alert("请选择要删除的数据", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
}); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
ElMessageBox.confirm("确定要批量删除所选数据吗?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 用户取消删除 |
||||
|
}); |
||||
|
} |
||||
|
const handleDelac=(val:any)=> { |
||||
|
ElMessageBox.confirm("你确定启用这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
|
||||
|
}) |
||||
|
.catch(() => { |
||||
|
// 捕获错误 |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
*{ |
||||
|
font-size: 15px; |
||||
|
font-weight: bolder; |
||||
|
} |
||||
|
.aaa { |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(6, 1fr); /* 五列 */ |
||||
|
align-items: start; /* 顶格对齐 */ |
||||
|
float: right; |
||||
|
width: 700px; |
||||
|
height: 30px; |
||||
|
margin: 5px 0; |
||||
|
} |
||||
|
.button-margin { |
||||
|
margin: 5px 0; /* 设置右侧外边距,调整按钮之间的间距 */ |
||||
|
} |
||||
|
:deep(.el-table th){ |
||||
|
font-weight: bold; /* 设置表头字体加粗 */ |
||||
|
color: #333; /* 设置表头字体颜色 */ |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,97 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="考试得分" /> |
||||
|
<el-table-column prop="name" label="考试次数" /> |
||||
|
<el-table-column prop="sex" label="状态" width="300"/> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" |
||||
|
>下载</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
|
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object as () => FormInfo, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit = defineEmits(['image-uploaded', 'update:diaiopShow', 'editRow', 'addRow']) |
||||
|
const formData = reactive({}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:diaiopShow", false); |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
Object.assign(formData,props.rowInfo) |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,97 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="考试得分" /> |
||||
|
<el-table-column prop="name" label="考试次数" /> |
||||
|
<el-table-column prop="sex" label="状态" width="300"/> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" |
||||
|
>下载</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
|
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit = defineEmits(['image-uploaded', 'update:diaiopShow', 'editRow', 'addRow']) |
||||
|
const formData = reactive({}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:diaiopShow", false); |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
Object.assign(formData,props.rowInfo) |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object as () => FormInfo, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign({}, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,152 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData: { |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData={ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}, |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
data.formData = Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
Object.assign({}, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", data.formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", data.formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
data.formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,161 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-08-15 11:34:38 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<template> |
||||
|
<el-dialog :model-value="true" :title="title" @close="handleClose"> |
||||
|
|
||||
|
<el-table |
||||
|
ref="multipleTableRef" |
||||
|
border |
||||
|
style="width: 100%" |
||||
|
stripe |
||||
|
> |
||||
|
<el-table-column prop="asd" label="工号" /> |
||||
|
<el-table-column prop="name" label="姓名" /> |
||||
|
<el-table-column prop="sex" label="属性" width="300"/> |
||||
|
<el-table-column prop="age" label="考试分数" /> |
||||
|
<el-table-column prop="num" label="状态" /> |
||||
|
<el-table-column prop="qwe" label="参加次数" /> |
||||
|
<el-table-column prop="zxc" label="查看详情"> |
||||
|
<el-button class="new_btn" type="primary" @click="handleNewed" |
||||
|
>查看</el-button> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-dialog> |
||||
|
<Diaiop |
||||
|
v-if="data.diaiopShow" |
||||
|
v-model:data.diaiopShow="data.diaiopShow" |
||||
|
:row-info="rowInfo" |
||||
|
:title="title" |
||||
|
/> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { reactive, toRefs, ref, onMounted} from "vue"; |
||||
|
import { Delete, Download, Plus, ZoomIn } from "@element-plus/icons-vue"; |
||||
|
import { ElMessage,UploadProps} from "element-plus"; |
||||
|
import "quill/dist/quill.snow.css"; |
||||
|
import type { UploadFile } from 'element-plus' |
||||
|
import Diaiop from "./diaiop.vue" |
||||
|
const childBorder = ref(false); |
||||
|
const parentBorder = ref(false); |
||||
|
const editContvalue = ref(""); |
||||
|
const props=defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: "", |
||||
|
}, |
||||
|
dialogShow: { |
||||
|
type: Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
rowInfo: { |
||||
|
type: Object, |
||||
|
default() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}, |
||||
|
arrayNum: { |
||||
|
type: Number, |
||||
|
default: 0, |
||||
|
}, |
||||
|
}) |
||||
|
const emit=defineEmits(['image-uploaded', 'update:dialogShow', 'editRow', 'addRow']) |
||||
|
const data = reactive({ |
||||
|
diaiopShow: false, |
||||
|
title:"", |
||||
|
rowInfo:{}, |
||||
|
studentInfoac:[ |
||||
|
{ |
||||
|
asd:"300946", |
||||
|
name:"刘来", |
||||
|
sex:"质检中心煤焦采制样操作工", |
||||
|
age:"65", |
||||
|
num:"及格", |
||||
|
qwe:"55", |
||||
|
zxc:"" |
||||
|
} |
||||
|
], |
||||
|
}); |
||||
|
const formData=reactive({ |
||||
|
id: props.arrayNum.toString(), |
||||
|
name: "", |
||||
|
sex: "", |
||||
|
num: "", |
||||
|
age:"", |
||||
|
qwe:"", |
||||
|
zxc:"", |
||||
|
}) |
||||
|
// 关闭弹窗 |
||||
|
const handleClose=()=> { |
||||
|
emit("update:dialogShow", false); |
||||
|
} |
||||
|
// 重置 |
||||
|
const resetForm=()=> { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
} |
||||
|
// 提交表单内容 |
||||
|
const submitForm=()=> { |
||||
|
handleClose(); |
||||
|
if (props.rowInfo.name) { |
||||
|
// 修改 |
||||
|
const id = props.rowInfo; |
||||
|
emit("editRow", formData); |
||||
|
} else { |
||||
|
// 新增 |
||||
|
formData["id"] = (props.arrayNum + 1).toString(); |
||||
|
emit("addRow", formData); |
||||
|
} |
||||
|
} |
||||
|
const handleNewed=()=> { |
||||
|
data.title = "查看试卷"; |
||||
|
data.rowInfo = {}; |
||||
|
data.diaiopShow = true; |
||||
|
} |
||||
|
const editorInstance = ref(null); |
||||
|
onMounted(() => { |
||||
|
Object.assign(formData, props.rowInfo); |
||||
|
}); |
||||
|
const handlePictureCardPreview = (file: UploadFile) => {}; |
||||
|
const disabled = ref(false); |
||||
|
const handleRemove = (file: UploadFile) => {}; |
||||
|
const handleDownload = (file: UploadFile) => {}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
|
||||
|
.avatar-uploader .avatar { |
||||
|
display: block; |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.avatar-uploader .el-upload { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
cursor: pointer; |
||||
|
border: 1px dashed var(--el-border-color); |
||||
|
border-radius: 6px; |
||||
|
transition: var(--el-transition-duration-fast); |
||||
|
} |
||||
|
|
||||
|
.avatar-uploader .el-upload:hover { |
||||
|
border-color: var(--el-color-primary); |
||||
|
} |
||||
|
|
||||
|
.el-icon.avatar-uploader-icon { |
||||
|
width: 178px; |
||||
|
height: 178px; |
||||
|
font-size: 28px; |
||||
|
color: #8c939d; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.el-dialog{ |
||||
|
width:1200px; |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
@ -0,0 +1,231 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<div class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</div> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<div class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</div> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-container> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<div class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</div> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</div> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="3" class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="3" class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="20"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 170px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="20"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 150px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="20"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="20"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="22"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,233 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,234 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
</el-col> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,234 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-col :span="1"> |
||||
|
<el-divider direction="vertical"/> |
||||
|
</el-col> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-row style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-container style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-container style="width: 100%"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-container> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-container clss=""> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-container> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-container clss="m-4"> |
||||
|
<el-col :span="2" class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-container> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
@ -0,0 +1,232 @@ |
|||||
|
<!-- |
||||
|
@ 作者: 鲁智强 |
||||
|
@ 时间: 2023-09-19 09:13:14 |
||||
|
@ 备注: |
||||
|
--> |
||||
|
<script lang='ts' setup> |
||||
|
import {ref,reactive,onMounted} from 'vue' |
||||
|
import { organdpost,posttarget,set_posttarget } from '@/api/opk/api' |
||||
|
import { addPostCont,tarlist,deltarget } from '@/api/opk/api' |
||||
|
import { editPostCont } from '@/api/opk/pulic/api' |
||||
|
import { departmentprogramme,edit_depart,edit_depart_progra } from '@/api/opk/news/api' |
||||
|
import { ge_copy } from '@/api/opk/zxy/news/api' |
||||
|
import { formItemValidateStates, TableV2SortOrder } from 'element-plus'; |
||||
|
import { getDictFormData } from '@/api/dict' |
||||
|
import Dialog from './dialog.vue' |
||||
|
import Dialoglog from './dialoglog.vue' |
||||
|
import Yg from './yg.vue' |
||||
|
// eslint-disable-next-line vue/require-prop-types |
||||
|
const { addShow, title } = defineProps(['addShow', 'title']) |
||||
|
const data = reactive({ |
||||
|
formInline:{ |
||||
|
region:'', |
||||
|
}, |
||||
|
title:"", |
||||
|
addPostBox: false, |
||||
|
edPostBox:false, |
||||
|
ygPostBox:false, |
||||
|
}) |
||||
|
const orgTreeProps ={ |
||||
|
label: 'name', |
||||
|
children:'child' |
||||
|
} |
||||
|
const orgTreeProp ={ |
||||
|
label: 'title', |
||||
|
children:'childen' |
||||
|
} |
||||
|
const formdat = { |
||||
|
someProp:"", |
||||
|
} |
||||
|
const total =ref(0) |
||||
|
const rowInfo = ref<any>({}) |
||||
|
const postIds = ref<number[]>([]) |
||||
|
const tableData = ref<any>([]); |
||||
|
const tables = ref<any>([]); |
||||
|
// 获取侧栏数据 |
||||
|
function jjjs(){ |
||||
|
addPostCont("/hrapi/org/govthree","post") |
||||
|
.then(data => { |
||||
|
tableData.value = data.data[3].child[14].child; |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.error('Error fetching data:', error); |
||||
|
}); |
||||
|
} |
||||
|
jjjs() |
||||
|
function editPost(){ |
||||
|
editPostCont({}) |
||||
|
.then(data => { |
||||
|
tables.value = data.data.list; |
||||
|
}) |
||||
|
} |
||||
|
editPost() |
||||
|
const table = ref<any>([]) |
||||
|
const formdate = reactive({ |
||||
|
page:0, |
||||
|
pagesize:20, |
||||
|
name:"", |
||||
|
dimension:"", |
||||
|
attribute:"", |
||||
|
orgidlist:"", |
||||
|
type:"", |
||||
|
value1:"2023", |
||||
|
}) |
||||
|
// 获取数据 |
||||
|
const tableq = ref([]) |
||||
|
const postt = ()=>{ |
||||
|
const ass = new Date(formdate.value1); |
||||
|
const qwe = ass.getFullYear(); |
||||
|
const zjr = qwe.toString(); |
||||
|
departmentprogramme({orgid:formdate.orgidlist,year:zjr,version:formdate.name}) |
||||
|
.then(data => { |
||||
|
tableq.value = data.data; |
||||
|
total.value = data.data.count; |
||||
|
}) |
||||
|
} |
||||
|
// 新增数据 |
||||
|
const addtableData = ()=>{ |
||||
|
data.addPostBox = true; |
||||
|
} |
||||
|
// 添加行 |
||||
|
const addRow = (val:any)=> { |
||||
|
tableData.value.push(val); |
||||
|
} |
||||
|
// 编辑行 |
||||
|
const editRow = (val:any)=> { |
||||
|
let index =tableData.value.findIndex( |
||||
|
(item:any) => item.id === val.id |
||||
|
); |
||||
|
tableData.value.splice(index, 1, val); |
||||
|
} |
||||
|
// 关闭弹窗 |
||||
|
const closeDetail = ()=>{ |
||||
|
data.addPostBox = false; |
||||
|
} |
||||
|
function editPostState(classId:string,state:number){ |
||||
|
console.log("改变状态--------->",classId,state) |
||||
|
let statusVal = 1 |
||||
|
if( state == 1) statusVal = 2; |
||||
|
edit_depart({id:classId,state:statusVal,istrue:2}) |
||||
|
postt() |
||||
|
} |
||||
|
// 删除数据 |
||||
|
const handleDel = (val:any) => { |
||||
|
const dictTypeIds = [val.outID || postIds.value].join(","); |
||||
|
let dictTypeIdAry = dictTypeIds.split(",") |
||||
|
ElMessageBox.confirm("你确定删除这条信息吗?", "提示", { |
||||
|
confirmButtonText: "确认", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(() => { |
||||
|
const add = val.key.toString() |
||||
|
handleSure(val) |
||||
|
console.log(val.id) |
||||
|
edit_depart({id:add,state:3,istrue:2}).then(()=> |
||||
|
ElMessage.success("删除成功")) |
||||
|
postt() |
||||
|
}) |
||||
|
}; |
||||
|
const handleSure = (val:any)=> { |
||||
|
const index = tableData.value.findIndex((item:any) => item.id === val.id); |
||||
|
if(index!=-1){ |
||||
|
tableData.value.splice(index, 1); |
||||
|
} |
||||
|
} |
||||
|
const resetChecked=()=> { |
||||
|
formdate.orgidlist = "" |
||||
|
postt() |
||||
|
} |
||||
|
const handle=(data:any)=>{ |
||||
|
formdate.orgidlist = data.id.toString() |
||||
|
postt() |
||||
|
} |
||||
|
const handleErd=(val:any)=>{ |
||||
|
data.edPostBox=true; |
||||
|
rowInfo.value=val; |
||||
|
} |
||||
|
const handleio=(val:any)=>{ |
||||
|
data.ygPostBox=true; |
||||
|
rowInfo.value = val; |
||||
|
} |
||||
|
onMounted(()=>{ |
||||
|
jjjs() |
||||
|
postt() |
||||
|
}) |
||||
|
</script> |
||||
|
<template> |
||||
|
<div class="m-2"> |
||||
|
<el-container clss="m-4"> |
||||
|
<div class="qwe"> |
||||
|
<el-button type="primary" style="width: 140px" size="large" @click="resetChecked">全选</el-button> |
||||
|
<el-tree ref="orgTreeRef" v-model="formdate.orgidlist" node-key="id" class="orgTree" :data="tableData" :props="orgTreeProps" :default-expand-all="false" @node-click="handle"/> |
||||
|
</el-col> |
||||
|
<el-divider direction="vertical"/> |
||||
|
<el-col :span="21"> |
||||
|
<el-container class="wer"> |
||||
|
<el-form-item label="方案版本号:"> |
||||
|
<el-input v-model="formdate.name" placeholder="请输入方案版本号" clearable style="width:200px"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="年度:" label-width="90"> |
||||
|
<el-date-picker v-model="formdate.value1" type="year"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label-width="25"> |
||||
|
<el-button type="primary" @click="postt"><el-icon><Search /></el-icon>查询</el-button> |
||||
|
<el-button class="new_btn" type="warning" @click="addtableData"><el-icon><Plus /></el-icon>新增</el-button> |
||||
|
</el-form-item> |
||||
|
</el-container> |
||||
|
<el-table class="m-1" :data="tableq" border style="width: 100%"> |
||||
|
<el-table-column prop="groupname,deaprtname," label="部门"> |
||||
|
<template #default="scope"> |
||||
|
{{scope.row.groupname}}{{scope.row.deaprtname}} |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="year" label="年" width="70"/> |
||||
|
<el-table-column prop="key" label="版本号"/> |
||||
|
<el-table-column prop="time" label="时间" /> |
||||
|
<el-table-column prop="state" label="状态" width="70"> |
||||
|
<template #default="scope"> |
||||
|
<el-switch v-model="scope.row.status" class="ml-2" inline-prompt style="--el-switch-on-color: #ff4949; --el-switch-off-color: #13ce66" @change="editPostState(scope.row.key,scope.row.state)"/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column fixed="right" label="操作" width="228"> |
||||
|
<template #default="{ row }"> |
||||
|
<el-button type="primary" link @click="handleio(row)"><el-icon><View /></el-icon>查看详情</el-button> |
||||
|
<el-button type="primary" link @click="handleErd(row)"><el-icon><DocumentChecked /></el-icon>复制</el-button> |
||||
|
<el-button type="primary" link @click="handleDel(row)"><el-icon><Delete /></el-icon>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-col> |
||||
|
</el-container> |
||||
|
<pagination v-if="total > 0" v-model:page="formdate.page" v-model:pagesize="formdate.pagesize" :total="total" @click="postt"/> |
||||
|
<Dialog v-if="data.addPostBox" v-model="data.addPostBox" :title="title" :array-num="tableData.length" @add-row="addRow" @edit-row="editRow"></Dialog> |
||||
|
<Dialoglog v-if="data.edPostBox" v-model="data.edPostBox" :title="title" :row-info="rowInfo"></Dialoglog> |
||||
|
<Yg v-if="data.ygPostBox" v-model="data.ygPostBox" :title="title" :row-info="rowInfo"></Yg> |
||||
|
</div> |
||||
|
</template> |
||||
|
<style lang='scss' scoped> |
||||
|
.qwe { |
||||
|
margin:-8px 0 0 -6px; |
||||
|
float:right; |
||||
|
} |
||||
|
.wer{ |
||||
|
margin:-5px 0 0 20px; |
||||
|
font-weight:normal; |
||||
|
} |
||||
|
.horizontal-controls { |
||||
|
display: flex; |
||||
|
float: left; |
||||
|
|
||||
|
} |
||||
|
.el-divider--vertical{ |
||||
|
display:inline-block; |
||||
|
width:1px; |
||||
|
height:812px; |
||||
|
margin:0 8px; |
||||
|
vertical-align:middle; |
||||
|
position:relative; |
||||
|
} |
||||
|
|
||||
|
/* 可以根据需要调整样式 */ |
||||
|
</style> |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue