# Conflicts: # src/views/home/content/Content.vue # src/views/task/aside/Aside.vue # src/views/task/content/Content.vuebak
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 268 KiB |
@ -0,0 +1,128 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
|
||||
const value = ref("");
|
||||
const showList = ref(false);
|
||||
const handlerShowList = () => (showList.value = true);
|
||||
const mock_list = [
|
||||
{
|
||||
title: "任务审批管理",
|
||||
data: [
|
||||
{
|
||||
title: "某某企业名称占位-1月拜访计划计划",
|
||||
},
|
||||
{
|
||||
title: "某某企业名称占位符占位占位-12月拜访计划计划",
|
||||
},
|
||||
{
|
||||
title: "某某企业-某某事业部-第四季度拜访计划计划",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "任务终审管理",
|
||||
data: [
|
||||
{
|
||||
title: "某某企业名称占位-1月拜访计划计划",
|
||||
},
|
||||
{
|
||||
title: "某某企业名称占位符占位占位-12月拜访计划计划",
|
||||
},
|
||||
{
|
||||
title: "某某企业名称占位符占位占位-12月拜访计划计划",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<div class="input_wrap">
|
||||
<div class="ip_box">
|
||||
<img src="../../assets/images/IP.png" alt="">
|
||||
</div>
|
||||
<div class="input_box">
|
||||
<n-input
|
||||
v-model:value="value"
|
||||
placeholder="搜索任务ID、任务名称、提报人、拜访终端"
|
||||
type="text"
|
||||
@mousedown="handlerShowList"
|
||||
>
|
||||
<template #prefix>
|
||||
<SvgIcon name="magnifying-1" size="18"></SvgIcon>
|
||||
</template>
|
||||
</n-input>
|
||||
</div>
|
||||
<div class="list_box" v-show="showList">
|
||||
<div
|
||||
class="list_classfiy_item"
|
||||
v-for="(item, index) in mock_list"
|
||||
:key="index"
|
||||
:style="(index == mock_list.length-1)?'':'border-bottom:1px solid #e4e4e4'"
|
||||
>
|
||||
<div class="list_title">{{ item.title }}</div>
|
||||
<div class="list_item" v-for="(sitem,sindex) in item.data" :key="sindex">
|
||||
<SvgIcon name="task-icon" size="16"></SvgIcon>
|
||||
<a style="margin-left: 5px">{{ sitem.title }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.input_wrap {
|
||||
width: 60%;
|
||||
position: absolute;
|
||||
top: 20%;
|
||||
left: 20%;
|
||||
.ip_box{
|
||||
z-index: 0;
|
||||
position: relative;
|
||||
left: calc(50% - 40px);
|
||||
top: 30px;
|
||||
img{
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.input_box {
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
border: 1px solid #507afd;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15),
|
||||
0px 0px 0px 0.5px #d4e3fc;
|
||||
}
|
||||
.list_box {
|
||||
background: #fefefe;
|
||||
border: 1px dashed #f4f4f4;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0px 12px 12px 0px rgba(80, 122, 253, 0.15);
|
||||
margin-top: 15px;
|
||||
padding: 8px 16px;
|
||||
.list_classfiy_item {
|
||||
.list_title {
|
||||
font-size: 12px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
color: #999999;
|
||||
line-height: 17px;
|
||||
margin: 10px 0 10px 5px;
|
||||
}
|
||||
.list_item {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.n-input .n-input-wrapper) {
|
||||
margin: 8px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div>
|
||||
<n-modal v-model:show="show" :mask="false" transform-origin="center">
|
||||
<Search />
|
||||
</n-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import Search from "@/components/Search/Search.vue";
|
||||
import { ref } from "vue";
|
||||
const show = ref(false);
|
||||
function showModal() {
|
||||
show.value = true;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
@ -0,0 +1,191 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "reject", params: any);
|
||||
(e: "viewrepeat");
|
||||
}>();
|
||||
|
||||
const show = ref(false);
|
||||
|
||||
function showModal() {
|
||||
show.value = true;
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
async function reject() {
|
||||
emit("reject", { a: "todo" });
|
||||
closeModal();
|
||||
}
|
||||
|
||||
async function viewRepeat(e: MouseEvent) {
|
||||
emit("viewrepeat");
|
||||
e.preventDefault();
|
||||
closeModal();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-modal v-model:show="show" transform-origin="center" class="modal_wrap">
|
||||
<div class="wrapper">
|
||||
<div class="wrapper-hearder">
|
||||
<div class="wrapper-title">欢迎登录智能AI审批工具</div>
|
||||
<div class="wrapper-mark">某某有限公司-某某事业部-张小凡</div>
|
||||
</div>
|
||||
<div class="wrapper-content">
|
||||
<div class="flex_box" style="height: 100px">
|
||||
<div class="item">
|
||||
<SvgIcon name="task_count" width="80" height="96" />
|
||||
<div class="num_box">6399</div>
|
||||
<div class="title_box">任务总数</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<SvgIcon name="task_wait" width="80" height="96" />
|
||||
<div class="num_box">6290</div>
|
||||
<div class="title_box">待审批</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<SvgIcon name="task_over" width="80" height="96" />
|
||||
<div class="num_box">109</div>
|
||||
<div class="title_box">已审批</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<SvgIcon
|
||||
@click="viewRepeat"
|
||||
style="cursor: pointer"
|
||||
name="login_r"
|
||||
width="200"
|
||||
height="70"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</n-modal>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.modal_wrap {
|
||||
background-image: url(../../../../assets/images/approval_modal_bg.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
width: 700px;
|
||||
height: 500px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.wrapper {
|
||||
position: absolute;
|
||||
left: calc(50% - 350px);
|
||||
.wrapper-hearder {
|
||||
margin-top: 110px;
|
||||
.wrapper-title {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC, PingFang SC-Semibold;
|
||||
font-weight: Semibold;
|
||||
text-align: center;
|
||||
color: #333333;
|
||||
line-height: 32px;
|
||||
}
|
||||
.wrapper-mark {
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
.wrapper-content {
|
||||
flex: 1;
|
||||
border-radius: 8px;
|
||||
margin: 100px 60px 35px 120px;
|
||||
.flex_box {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.item {
|
||||
.num_box {
|
||||
font-size: 32px;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC-Bold;
|
||||
font-weight: Bold;
|
||||
text-align: left;
|
||||
color: #202020;
|
||||
text-align: center;
|
||||
}
|
||||
.title_box {
|
||||
opacity: 0.6;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: center;
|
||||
color: #202020;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.imgwrapper {
|
||||
width: 200px;
|
||||
height: 120px;
|
||||
margin-right: 20px;
|
||||
border-radius: 8px;
|
||||
background-image: url("../../../assets/images/test.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
.content {
|
||||
.task_id {
|
||||
font-size: 14px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
}
|
||||
.tag_box {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
margin: 8px 0;
|
||||
.tag_item {
|
||||
background: rgba(80, 122, 253, 0.1);
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: left;
|
||||
color: #507afd;
|
||||
line-height: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.time_box {
|
||||
font-size: 14px;
|
||||
font-family: PingFang SC, PingFang SC-Regular;
|
||||
font-weight: Regular;
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 20px 30px 0 0;
|
||||
position: relative;
|
||||
bottom: -80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,258 @@
|
||||
<script lang="ts" setup>
|
||||
import { ReportInfoConfig } from "@/config/workorder";
|
||||
import { ref } from "vue";
|
||||
|
||||
const offList = ref<any[]>([]);
|
||||
function generatList() {
|
||||
const keys = Object.keys(ReportInfoConfig);
|
||||
const hideList: object[] = [];
|
||||
for (const key of keys) {
|
||||
const name = ReportInfoConfig[key]?.label;
|
||||
const isDefault = ReportInfoConfig[key]?.isDefault;
|
||||
|
||||
// 系统配置为Y且不是默认配置
|
||||
if (!isDefault) {
|
||||
hideList.push({
|
||||
id: key,
|
||||
name: name || "未配置",
|
||||
fix: isDefault,
|
||||
checked: ReportInfoConfig[key].isDefault,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const fixedList = generateDefaultList();
|
||||
|
||||
hideList.unshift(...fixedList);
|
||||
|
||||
offList.value = hideList;
|
||||
return { hideList };
|
||||
}
|
||||
|
||||
function generateDefaultList() {
|
||||
return Object.keys(ReportInfoConfig).reduce((acc, key) => {
|
||||
const { label, isDefault } = ReportInfoConfig[key];
|
||||
|
||||
if (isDefault) {
|
||||
const config = {
|
||||
id: key,
|
||||
name: label || "未配置",
|
||||
fix: true,
|
||||
checked: true,
|
||||
};
|
||||
return [...acc, config];
|
||||
} else {
|
||||
return acc;
|
||||
}
|
||||
}, []);
|
||||
}
|
||||
|
||||
const show = ref(false);
|
||||
const checkAll = ref(false);
|
||||
|
||||
function showModal() {
|
||||
show.value = true;
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
show.value = false;
|
||||
}
|
||||
|
||||
async function handleSumbit(e: MouseEvent) {
|
||||
e.preventDefault();
|
||||
closeModal();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
|
||||
generatList();
|
||||
|
||||
const selectIds = ref<string[]>([]);
|
||||
|
||||
function onCheckAllChange(value) {
|
||||
const ids: string[] = [];
|
||||
|
||||
for (const item of offList.value) {
|
||||
if (!item.fix) {
|
||||
item.checked = value;
|
||||
ids.push(item.id);
|
||||
}
|
||||
}
|
||||
|
||||
selectIds.value = value ? ids : [];
|
||||
}
|
||||
|
||||
function onCheckChange(checked: any, item: any) {
|
||||
const index = selectIds.value.indexOf(item.id);
|
||||
|
||||
item.checked = checked;
|
||||
|
||||
if (index === -1 && checked) selectIds.value.push(item.id);
|
||||
else selectIds.value.splice(index, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-modal v-model:show="show" transform-origin="center">
|
||||
<n-card
|
||||
class="cardstyle"
|
||||
:bordered="false"
|
||||
size="huge"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
>
|
||||
<div class="wrapper">
|
||||
<span class="wrapper-title">自定义填报信息</span>
|
||||
<n-grid cols="4" class="mt-4 proCard" responsive="screen" :x-gap="24">
|
||||
<n-grid-item span="4">
|
||||
<NCard
|
||||
title=""
|
||||
class="dragcardStyle"
|
||||
:segmented="{ content: true, footer: true }"
|
||||
size="small"
|
||||
:bordered="false"
|
||||
>
|
||||
<div>
|
||||
<div class="draggable-ul">
|
||||
<div class="draggable-li" style="background: #f8f8f8;">
|
||||
<n-checkbox
|
||||
v-model:checked="checkAll"
|
||||
label="全部"
|
||||
@update:checked="onCheckAllChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div
|
||||
v-for="item in offList"
|
||||
:key="item.id"
|
||||
style="width: 170px"
|
||||
:class="{ 'disable-check': item.fix }"
|
||||
class="draggable-li"
|
||||
>
|
||||
<n-checkbox
|
||||
v-model:checked="item.checked"
|
||||
:label="item.name"
|
||||
:disabled="item.fix"
|
||||
@update:checked="onCheckChange($event, item)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</NCard>
|
||||
</n-grid-item>
|
||||
</n-grid>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="wrapper-footer">
|
||||
<n-button type="info" @click="handleSumbit"> 确认 </n-button>
|
||||
<n-button secondary style="margin-left: 15px" @click="closeModal">
|
||||
取消
|
||||
</n-button>
|
||||
</div>
|
||||
</template>
|
||||
</n-card>
|
||||
</n-modal>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&-title {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&-bar {
|
||||
background-color: #e8e8e8;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
&-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
&-info {
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
background-color: #1980ff;
|
||||
content: "";
|
||||
width: 5px;
|
||||
border-radius: 2px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dragcardStyle {
|
||||
--n-padding-bottom: 0px !important;
|
||||
--n-padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.cardstyle {
|
||||
width: 820px;
|
||||
--n-padding-bottom: 20px;
|
||||
--n-padding-left: 24px;
|
||||
}
|
||||
|
||||
.textbtnStyle {
|
||||
cursor: pointer;
|
||||
color: #1980ff;
|
||||
}
|
||||
|
||||
.draggable-ul {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border: 1px solid #cad2dd;
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.draggable-li {
|
||||
padding: 10px 16px;
|
||||
color: #333;
|
||||
|
||||
}
|
||||
|
||||
.draggable-item {
|
||||
padding: 10px 16px;
|
||||
color: #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.disable-check {
|
||||
color: gainsboro;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep(
|
||||
.n-card.n-card--content-segmented > .n-card__content:not(:first-child)
|
||||
) {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
::v-deep(.n-card > .n-card-header) {
|
||||
--n-padding-top: 0px;
|
||||
--n-padding-bottom: 12px;
|
||||
}
|
||||
</style>
|