소스 검색

会议室预定

ZhaoJing 2 년 전
부모
커밋
073f341847

+ 9 - 9
src/pages/menuData.js

@@ -46,15 +46,15 @@ export const menuList = [
       { icon: getAssetsImages('index/sbxmk.png'), menuName: '设备项目库', path: '/equipmentPurchaseApply/equipmentItemLibrary' },
     ],
   },
-  // {
-  //   title: '会议预定管理',
-  //   list: [
-  //     { icon: getAssetsImages('index/hysyd.png'), menuName: '会议室预定' },
-  //     { icon: getAssetsImages('index/hyjy.png'), menuName: '会议纪要' },
-  //     { icon: getAssetsImages('index/hyjyk.png'), menuName: '会议纪要库' },
-  //     { icon: getAssetsImages('index/hysgl.png'), menuName: '会议室管理' },
-  //   ],
-  // },
+  {
+    title: '会议预定管理',
+    list: [
+      { icon: getAssetsImages('index/hysyd.png'), menuName: '会议室预定', path: '/reserveMeetingRooms' },
+      // { icon: getAssetsImages('index/hyjy.png'), menuName: '会议纪要' },
+      // { icon: getAssetsImages('index/hyjyk.png'), menuName: '会议纪要库' },
+      // { icon: getAssetsImages('index/hysgl.png'), menuName: '会议室管理' },
+    ],
+  },
   {
     tag: 'xmgl',
     title: '项目管理',

+ 142 - 0
src/pages/reserveMeetingRooms/detail/index.vue

@@ -0,0 +1,142 @@
+<script setup>
+import { closeToast, showLoadingToast } from 'vant'
+import QRCode from "qrcode";
+const { currentRoute } = useRouter()
+const route = currentRoute.value
+const hysyd_id = route.query.hysyd_id
+const detailData = ref({})
+showLoadingToast({
+    message: '加载中...',
+    forbidClick: true,
+})
+request({
+    url: '/jdbg/hy_hysyd/detail',
+    data: {
+        hysyd_id,
+    },
+}).then((res) => {
+    closeToast()
+    detailData.value = res.data.one_info
+    makeQrcode();
+})
+function getFile(f) {
+    let link = window.globalVariables.api + "/openapi/download.php?path=" + f.split('|')[0] + '&name=' + f.split('|')[1].split('.')[0]
+    window.open(link, '_blank')
+}
+let canvas = $ref();
+function makeQrcode() {
+    let opts = {
+        errorCorrectionLevel: "H",
+        type: "image.png",
+        width: 120,
+        height: 120,
+        text: detailData.value.qrcode,
+    };
+    QRCode.toCanvas(canvas, detailData.value.qrcode, opts);
+}
+</script>
+
+<template>
+    <div>
+        <div class="tableContainer">
+            <div class="topPart">
+                <table class="Tb" width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td class="titleOpt">
+                            会议名称
+                        </td>
+                        <td>{{ detailData.hysyd_hymc }}</td>
+                    </tr>
+                    <tr>
+                        <td class="titleOpt">
+                            会议状态
+                        </td>
+                        <td>
+                            {{ detailData.hysyd_hyzt_option_n }}
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="titleOpt">
+                            会议室
+                        </td>
+                        <td>{{ detailData.hysyd_hys_mc }}</td>
+                    </tr>
+                    <tr>
+                        <td class="titleOpt">
+                            会议时间
+                        </td>
+                        <td class="leading-25px">
+                            <p>{{ detailData.hysyd_hysj_ks }} -</p>
+                            <p>{{ detailData.hysyd_hysj_js }}</p>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="titleOpt">会议资料</td>
+                        <td>
+                            <template v-if="detailData.hysyd_hyzl">
+                                <div v-for="(wj, index) in detailData.hysyd_hyzl.split(';')" :key="index">
+                                    <p class="cursor-pointer text-blue-500" @click="getFile(wj)">{{ wj.split("|")[1] }}</p>
+                                </div>
+                            </template>
+                            <span v-else>未上传附件</span>
+                        </td>
+                    </tr>
+                    <tr v-show="detailData.hysyd_ewm_option_k == '1'">
+                        <td>请扫描二维码进行签到</td>
+                        <td>
+                            <canvas ref="canvas"></canvas>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div class="nav">
+                <table class="Tb mt-20px text-14px" width="100%" cellspacing="0" cellpadding="0">
+                    <thead>
+                        <tr>
+                            <td class="text-15px text-center" colspan="4">参会人员签到状态</td>
+                        </tr>
+                    </thead>
+                    <tr>
+                        <td>序号</td>
+                        <td>参会人员</td>
+                        <td>签到状态</td>
+                        <td>签到时间</td>
+                    </tr>
+                    <tr v-for="(item, index) in detailData.sign" :key="item.user_id">
+                        <td>{{ index + 1 }}</td>
+                        <td>{{ item.realname }}</td>
+                        <td>{{ item.is_sign == 0 ? '未签到' : '已签到' }}</td>
+                        <td>
+                            <span class="signed" v-if="item.dateline">{{
+                                item.dateline }}</span>
+                            <span v-else>--</span>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+</template>
+
+<style lang="scss" scoped>
+.titleOpt {
+    width: 30%;
+}
+
+.Tb tr td {
+    padding: 8px 8px;
+}
+
+.border_bottom {
+    border-bottom: 2px solid #666;
+    border-top: 2px solid #666;
+}
+
+.text-red {
+    color: red;
+}
+
+:deep(.specialTd table tbody tr td) {
+    border: 1px #CCCCCC solid !important;
+}
+</style>

+ 17 - 0
src/pages/reserveMeetingRooms/index.vue

@@ -0,0 +1,17 @@
+<script setup>
+import myInitateFor from './myInitiateFor/index.vue'
+import myAttendFor from './myAttendFor/index.vue'
+</script>
+
+<template>
+    <div>
+        <van-tabs :sticky="true">
+            <van-tab title="我发起的">
+                <myInitateFor />
+            </van-tab>
+            <van-tab title="我参与的">
+                <myAttendFor />
+            </van-tab>
+        </van-tabs>
+    </div>
+</template>

+ 98 - 0
src/pages/reserveMeetingRooms/myAttendFor/index.vue

@@ -0,0 +1,98 @@
+<script setup>
+import { userInfo } from '~/store/user'
+
+const { uo_type, uo_name, user_id } = userInfo
+const router = useRouter();
+const isBureau = ref(false)// 当前用户是否局端
+isBureau.value = uo_type === '1'
+const list = ref([])
+const loading = ref(false)
+const finished = ref(false)
+let page = 1
+const param = $ref({
+    hysyd_hyzt: '',
+    hysyd_hymc: '',
+    hysyd_chry_id: user_id
+})
+function onLoad() {
+    loading.value = true
+    request({
+        url: '/jdbg/hy_hysyd/index',
+        data: {
+            page,
+            limit: 20,
+            ...param,
+        },
+    }).then((res) => {
+        const data = res.data
+        list.value = [...list.value, ...data.page_data]
+        finished.value = data.total_page === page
+        page++
+        loading.value = false
+    })
+}
+const searchValue = $ref('')
+function onClickSearch() {
+    reGetList()
+}
+const yearOption = $ref([{ text: '状态', value: '' }, { text: '未开始', value: '0' }, { text: '进行中', value: '1' }, { text: '已结束', value: '2' }])
+const itemRef = ref(null)
+function onConfirm() {
+    itemRef.value.toggle()
+    reGetList()
+}
+function dropItemChange() {
+    reGetList()
+}
+function reGetList() {
+    page = 1
+    list.value = []
+    finished.value = false
+    onLoad()
+}
+
+function handleLinkTo(item) {
+    router.push({ path: '/reserveMeetingRooms/detail', query: { hysyd_id: item.hysyd_id } })
+}
+</script>
+
+<template>
+    <div class="index">
+        <van-search v-model="param.hysyd_hymc" :clearable="false" show-action placeholder="请输入搜索关键词"
+            @search="onClickSearch">
+            <template #action>
+                <div @click="onClickSearch">
+                    搜索
+                </div>
+            </template>
+        </van-search>
+        <van-dropdown-menu>
+            <van-dropdown-item v-model="param.hysyd_hyzt" :options="yearOption" @change="dropItemChange" />
+        </van-dropdown-menu>
+        <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+            <van-cell v-for="item in list" :key="item" @click="handleLinkTo(item)">
+                <template #title>
+                    <span>{{ `${item.hysyd_hymc}\u00A0\u00A0\u00A0 ${item.hysyd_hys_mc}` }}</span>
+                </template>
+                <template #value>
+                    <span style="color:black">状态:{{ item.hysyd_hyzt }}</span>
+                </template>
+                <template #label>
+                    <span class="van-ellipsis">会议时间:{{ item.hysyd_hysj_ks }}-{{ item.hysyd_hysj_js }}</span>
+                </template>
+            </van-cell>
+        </van-list>
+    </div>
+</template>
+
+<style lang="scss" scoped>
+:deep(.van-cell__title) {
+    width: 70% !important;
+    flex: auto
+}
+
+:deep(.van-cell__value) {
+    width: 30% !important;
+    flex: auto
+}
+</style>

+ 98 - 0
src/pages/reserveMeetingRooms/myInitiateFor/index.vue

@@ -0,0 +1,98 @@
+<script setup>
+import { userInfo } from '~/store/user'
+
+const { uo_type, uo_name, user_id } = userInfo
+const router = useRouter();
+const isBureau = ref(false)// 当前用户是否局端
+isBureau.value = uo_type === '1'
+const list = ref([])
+const loading = ref(false)
+const finished = ref(false)
+let page = 1
+const param = $ref({
+    hysyd_hyzt: '',
+    hysyd_hymc: '',
+    create_user_id: user_id
+})
+function onLoad() {
+    loading.value = true
+    request({
+        url: '/jdbg/hy_hysyd/index',
+        data: {
+            page,
+            limit: 20,
+            ...param,
+        },
+    }).then((res) => {
+        const data = res.data
+        list.value = [...list.value, ...data.page_data]
+        finished.value = data.total_page === page
+        page++
+        loading.value = false
+    })
+}
+const searchValue = $ref('')
+function onClickSearch() {
+    reGetList()
+}
+const yearOption = $ref([{ text: '状态', value: '' }, { text: '未开始', value: '0' }, { text: '进行中', value: '1' }, { text: '已结束', value: '2' }])
+const itemRef = ref(null)
+function onConfirm() {
+    itemRef.value.toggle()
+    reGetList()
+}
+function dropItemChange() {
+    reGetList()
+}
+function reGetList() {
+    page = 1
+    list.value = []
+    finished.value = false
+    onLoad()
+}
+
+function handleLinkTo(item) {
+    router.push({ path: '/reserveMeetingRooms/detail', query: { hysyd_id: item.hysyd_id } })
+}
+</script>
+
+<template>
+    <div class="index">
+        <van-search v-model="param.hysyd_hymc" :clearable="false" show-action placeholder="请输入搜索关键词"
+            @search="onClickSearch">
+            <template #action>
+                <div @click="onClickSearch">
+                    搜索
+                </div>
+            </template>
+        </van-search>
+        <van-dropdown-menu>
+            <van-dropdown-item v-model="param.hysyd_hyzt" :options="yearOption" @change="dropItemChange" />
+        </van-dropdown-menu>
+        <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
+            <van-cell v-for="item in list" :key="item" @click="handleLinkTo(item)">
+                <template #title>
+                    <span>{{ `${item.hysyd_hymc}\u00A0\u00A0\u00A0 ${item.hysyd_hys_mc}` }}</span>
+                </template>
+                <template #value>
+                    <span style="color:black">状态:{{ item.hysyd_hyzt }}</span>
+                </template>
+                <template #label>
+                    <span class="van-ellipsis">会议时间:{{ item.hysyd_hysj_ks }}-{{ item.hysyd_hysj_js }}</span>
+                </template>
+            </van-cell>
+        </van-list>
+    </div>
+</template>
+
+<style lang="scss" scoped>
+:deep(.van-cell__title) {
+    width: 70% !important;
+    flex: auto
+}
+
+:deep(.van-cell__value) {
+    width: 30% !important;
+    flex: auto
+}
+</style>