提交 82025e89 编写于 作者: 刘英杰's avatar 刘英杰

保存

上级
流水线 #31159 已失败
{
"plugins": [
[
"import",
{
"libraryName": "view-ui-plus",
"libraryDirectory": "src/components"
},
"view-ui-plus"
]
]
}
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
#dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
/node_modules
#/dist
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.zip
*.rar
default:
before_script:
- chcp 65001
stages:
- publish
build:
stage: publish
script:
# - remove-item -Force -Recurse D:\ASC_web\A00051\placeManagement\wx*
# - xcopy "dist" "D:\ASC_web\A00051\placeManagement\wx\" /s/e/y/
only:
- wx
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}
# 场地管理-移动端
## 单点方式:/et?type=test
\ No newline at end of file
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
declare module 'vue' {
export interface GlobalComponents {
BorrowingAndReturningListCard: typeof import('./src/components/key/borrowingAndReturningListCard.vue')['default']
Card: typeof import('./src/components/card.vue')['default']
DetailCard: typeof import('./src/components/activityManagementDetail/detailCard.vue')['default']
FlowCard: typeof import('./src/components/flowCard.vue')['default']
Header: typeof import('./src/components/header.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
KeyCard: typeof import('./src/components/key/keyCard.vue')['default']
Page: typeof import('./src/components/page.vue')['default']
Popup: typeof import('./src/components/popup.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SelectPlace: typeof import('./src/components/flow/selectPlace.vue')['default']
SelectPlaceType: typeof import('./src/components/flow/selectPlaceType.vue')['default']
SiteCard: typeof import('./src/components/siteCard.vue')['default']
SiteSelectHeader: typeof import('./src/components/siteSelectHeader.vue')['default']
Tree: typeof import('./src/components/tree.vue')['default']
VanBadge: typeof import('vant/es')['Badge']
VanButton: typeof import('vant/es')['Button']
VanCalendar: typeof import('vant/es')['Calendar']
VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
VanDialog: typeof import('vant/es')['Dialog']
VanDropdownItem: typeof import('vant/es')['DropdownItem']
VanDropdownMenu: typeof import('vant/es')['DropdownMenu']
VanEmpty: typeof import('vant/es')['Empty']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanIcon: typeof import('vant/es')['Icon']
VanImage: typeof import('vant/es')['Image']
VanList: typeof import('vant/es')['List']
VanLoading: typeof import('vant/es')['Loading']
VanNavBar: typeof import('vant/es')['NavBar']
VanPagination: typeof import('vant/es')['Pagination']
VanPicker: typeof import('vant/es')['Picker']
VanPopover: typeof import('vant/es')['Popover']
VanPopup: typeof import('vant/es')['Popup']
VanRadio: typeof import('vant/es')['Radio']
VanRadioGroup: typeof import('vant/es')['RadioGroup']
VanRate: typeof import('vant/es')['Rate']
VanSearch: typeof import('vant/es')['Search']
VanStep: typeof import('vant/es')['Step']
VanSteps: typeof import('vant/es')['Steps']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
VanTag: typeof import('vant/es')['Tag']
VanTreeSelect: typeof import('vant/es')['TreeSelect']
}
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>场地管理</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
{
"name": "site-management",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@ysx-libs/vue-virtual-tree": "^0.0.5",
"@zeronejs/cli": "^2.15.0",
"animate.css": "^4.1.1",
"axios": "^1.5.0",
"dayjs": "^1.11.9",
"jquery": "^3.7.1",
"js-cookie": "^3.0.5",
"jweixin-module": "^1.6.0",
"liquor-tree": "^0.2.70",
"lodash": "^4.17.21",
"mitt": "^3.0.1",
"vant": "^4.6.6",
"vconsole": "^3.15.1",
"view-ui-plus": "^1.3.15",
"vue": "^3.3.4",
"vue-cookies": "^1.8.3",
"vue-qr": "^4.0.9",
"vue-router": "^4.2.4",
"weixin-js-sdk": "^1.6.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"autoprefixer": "^10.4.16",
"babel-plugin-import": "^1.13.8",
"less": "^4.2.0",
"postcss": "^8.4.32",
"tailwindcss": "^3.4.0",
"unplugin-vue-components": "^0.25.1",
"vite": "^4.4.5"
}
}
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>消息跳转</title>
</head>
<body>
<!-- <iframe id="ifr" src="" frameborder="0"></iframe>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
var script = document.createElement('script') ;
script.type ='text/javascript' ;
script.src = "https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
var head = document.getElementsByTagName('head').item(0);
head.appendChild(script);
script.onload = function(){
$("#ifr").attr("src","https://asc.neaic.com/SRFlowIfream/view/RequestLeavingBackFileUpload.html?imgDel=1&PKVal=2583&FK_MapFrame=ND26201_Frame1&WorkID=2583&FK_Node=26201&UserNo=101&UserName=");
};
</script> -->
<script id="identifyEl" src="/a/manager/identify/identify.js"></script>
<script>
function GetQueryValue(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var itemStr = window.location.href;
console.log(itemStr);
var itemArr = itemStr.split("links=");
//console.log(itemIndex);
var r = itemArr[1];
for (var i = 2; i < itemArr.length; i++) {
r = r + "links=" + itemArr[i];
}
//匹配目标参数
console.log(r)
return r + "&qrcode=" + getUrlParam("qrcode"); //返回参数值
}
function scriptLoad(script, callback) {
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == 'complete' || script.readyState == 'loaded') {
script.onreadystatechange = null;
callback();
}
}
} else { //非IE
script.onload = function () {
callback();
}
}
}
var identifyEl = document.getElementById('identifyEl');
var i = 0;
var token = null;
while (i == 0) {
if (token != null) {
i = 1;
var links = GetQueryValue("links");
if (links) {
if (token) {
idt.Jump(links, '1');
}
} else {
alert("未找到跳转路径,请核对!");
}
} else {
token = idt.GetToken();
}
}
window.location.href = `/DutyManagement/wx/#/getInfo?type=2&links=${getUrlParam('links')}&id=${getUrlParam('id')}&token=${token}`;
console.log("🚀🚀🚀ssohtml,links,", links)
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r != null) return unescape(r[2]);
return null; //返回参数值
}
</script>
</body>
</html>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
<script setup>
</script>
<template>
<router-view></router-view>
</template>
<style>
body {
margin: 0;
}
</style>
import {requestGet, requestPost} from '../util/request.js'
import axios from 'axios'
export function ImageUpLoad(data) {
//照片上传
return requestPost(`/api/Attendance/ImageUpLoad`, data)
}
/**
* 单点
* **/
export function wxsan(data) {
//单点
return requestGet(`/api/sso/wxsan?&code=${data.code}&sign=${data.sign}&timestamp=${data.timestamp}`, data)
}
export function wx(data) {
//单点
return requestGet(`/api/sso/wx?token=${data.token}`, data)
}
export function SSOPC(data) {
//单点
return requestGet(`/api/sso/pc?token=${data.token}`, data)
}
export function GetTokenInfo(data) {
//获取用户信息
return requestGet(`/api/GetTokenInfo`, data)
}
export function RefreshToken(data) {
//刷新token
return requestGet(`/api/RefreshToken`, data)
}
export function CheckLoginTest(data) {
//test token
return requestGet(`/api/Login/CheckLoginTest?card=asc666`, data)
}
// syjs516
export function GetWxConfig(data) {
//微信扫码初始化
return requestGet(
`${window.location.protocol + "//" + window.location.host}/wx/eicrs/api/GetJSSDK/GetWxConfig?url=${data.url}`,
data
);
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
\ No newline at end of file
<template>
<van-button type="primary">主要按钮</van-button>
<van-button type="success">成功按钮</van-button>
<van-button type="default">默认按钮</van-button>
<van-button type="warning">警告按钮</van-button>
<van-button type="danger">危险按钮</van-button>
</template>
<script setup>
</script>
<script setup>
//活动详情页卡片,传入数组循环生成卡片 一个数组生成一个卡片
const props = defineProps({
array: Array,
nmt: Boolean,
nmb: Boolean,
})
import {showImagePreview} from 'vant';
function imagePreview(All, index) {
//获取评价图片数组 遍历得到预览结构
let image = []
All.map((cur, inde) => {
image.push(window.location.origin + cur.path)
})
showImagePreview({
images: image,
startPosition: index,
});
}
</script>
<template>
<!-- 活动管理详细内容中的卡片-->
<div :style="{'margin-top': props.nmt ? 0 : 0.75+'rem', 'margin-bottom': props.nmb ? 0.75 : 0 +'rem'}"
class="w-full h-auto bg-white">
<div v-for="(item,index) in props.array" :key="index" class=" w-full min-h-[50px] flex p-3 ">
<!-- 标题-->
<div class="w-[30%] h-full flex items-center text-wrap box-border">
<span>{{ item.label }}</span>
</div>
<!-- 内容为文字-->
<div v-if="item.value" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">{{ item.value }}</span>
</div>
<!-- 内容为图片-->
<div v-else-if="item.image" class="w-[70%] h-full flex items-center text-wrap box-border">
<div class=" w-full min-h-[80px] flex justify-start">
<div v-for="(ite,inde) in item.image" :key="inde" @click="imagePreview(item.image,inde)"
class="m-1 w-[70px] h-[60px] border border-dashed border-gray-300">
<img :src="ite.path" class="w-full h-full">
</div>
</div>
</div>
<!-- 内容为星级-->
<div v-else-if="item.level" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-rate
readonly
v-model="item.level"
:size="25"
:count="5"
color="#FE9E0B"
void-icon="star"
void-color="#eee"
/>
</span>
</div>
<!-- 内容为星级-->
<div v-else-if="item.tag" class="w-[70%] h-full flex items-center text-wrap box-border">
<span class="ml-1">
<van-tag size="large" type="success">
<span>
{{ item.tag }}
</span>
</van-tag>
</span>
</div>
</div>
</div>
</template>
<style scoped>
</style>
<template>
<!-- 活动管理卡片-->
<div class="w-full min-h-[240px]
bg-white rounded-[8px] mb-4
">
<div class="relative p-3 w-full h-[18%] border-b-[1px] flex items-center ">
<span class="font-black text-gray-600">{{ item.name }}</span>
<span class="text-[14px] text-gray-400 " v-if="item.phone">({{ item.phone }})</span>
<div class="w-[50px] h-[50px] absolute right-2 top-3">
<slot name="image"></slot>
</div>
</div>
<div class=" p-3 w-full min-h-[60%]">
<div class="w-full h-[30px] flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">场地类型</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.place_type_name }}
</div>
</div>
<div class="w-full h-[30px] flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">场地名称</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.place_name }}
</div>
</div>
<div class="w-full h-[30px] flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">开始时间</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.begin_time }}
</div>
</div>
<div class="w-full h-[30px] flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">结束时间</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.end_time }}
</div>
</div>
<div class="w-full h-[30px] flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">使用时长</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.use_duration }}分钟
</div>
</div>
<div class="w-full h-[30px] flex" v-if="props.overTimeFlag">
<div class="w-1/3 h-full">
<span class="text-gray-600">加时时长</span>
</div>
<div class="w-[25%] h-full flex justify-center ">
<span class="text-red-600 ">{{ item.operator_duration }}分钟</span>
</div>
<div class="text-gray-600 w-[42%] h-full flex justify-end">
{{ item.operator_end_time }}
</div>
</div>
</div>
<div class=" p-3 w-full h-[22%] border-t-[1px] flex justify-between">
<slot name="default"></slot>
</div>
</div>
</template>
<script setup>
import {defineProps} from 'vue'
const props = defineProps({
item: Object,
overTimeFlag: {
type: Boolean,
default: false
}
})
</script>
<style scoped>
</style>
<template>
<div class="w-screen h-screen flex items-center">
<van-cell-group class="w-full">
<!--场地选择器-->
<van-field
:disabled="formValidate.data.place_type_id ===''"
v-model="init.placeText"
is-link
readonly
name="place"
label="场地"
placeholder="点击选场地"
@click="init.place = true"
/>
<van-popup v-model:show="init.place" position="bottom">
<van-picker
:columns="init.placeArray"
@confirm="onConfirm($event,'place')"
@cancel="init.place = false"
/>
</van-popup>
</van-cell-group>
</div>
</template>
<script setup>
import {onMounted, reactive} from "vue";
import * as api from "../../util/request/dist/controller/index.js";
const init = reactive({
timeRange: false,
placeType: false,
place: false,
beginTime: false,
endTime: false,
commodity: false,
date: false,
timeRangeText: '',
dateText: "",
placeTypeText: '',
placeText: '',
beginTimeText: '',
endTimeText: '',
commodityText: '',
placeTypeArray: '',
placeArray: '',
beginTimeArray: '',
endTimeArray: '',
commodityArrat: [],
minDateStart: '',
maxDateStart: '',
})
const formValidate = reactive({
data: {
date: '',
"place_type_id": "",
"place_id": "",
"begin_time": "",
"end_time": "",
"remark": "",
"commodity_list": [],
}
})
const onConfirm = ({selectedValues, selectedOptions}, key) => {
const obj = (selectedOptions, key, tf = "") => {
//根绝key 处理显示的数据
switch (tf) {
case 1:
//处理时间
let array = []
selectedOptions.map(cur => array.push(cur.text))
init[key + 'Text'] = array.join('-');
init[key] = false
break;
default :
//处理其他
init[key + 'Text'] = selectedOptions[0].text;
init[key] = false
break;
}
}
const pickerObj = {
//根据key 进行策略
'placeType': function (selectedOptions, key) {
formValidate.data.place_type_id = selectedOptions[0].value;
obj(selectedOptions, key)
api.getApiCommonGetPlaceSelect({id: selectedOptions[0].value}).then(res => {
//获取场地类型
let array = []
res.response.map((cur, index) => {
array.push({text: cur.name, value: cur.id})
})
init.placeArray = array
})
},
'place': function (selectedOptions, key) {
formValidate.data.place_id = selectedOptions[0].value;
if (formValidate.data.place_id !== '' && formValidate.data.date !== '') api.getApiPlaceGetPlaceHourList({
place_id: formValidate.data.place_id,
day: formValidate.data.date,
}).then(res => {
check.data.list = res.response
})
obj(selectedOptions, key)
},
'date': function (selectedOptions, key) {
console.log("🚀🚀🚀,", selectedOptions, key)
},
'beginTime': function (selectedOptions, key) {
let array = []
selectedOptions.map(cur => array.push(cur.value))
formValidate.data.begin_time = array.join('-');
obj(selectedOptions, key, 1)
},
'endTime': function (selectedOptions, key) {
let array = []
selectedOptions.map(cur => array.push(cur.value))
formValidate.data.end_time = array.join('-');
obj(selectedOptions, key, 1)
},
}
//使用策略
pickerObj[key](selectedOptions, key)
};
const getSelectArray = () => {
api.getApiCommonGetPlaceTypeSelect().then(res => {
//获取场地类型
let array = []
res.response.map((cur, index) => {
array.push({text: cur.name, value: cur.id})
})
init.placeTypeArray = array
})
}
onMounted(() => {
getSelectArray()
})
</script>
<style scoped>
</style>
此差异已折叠。
<script setup>
import {getImage} from "../hooks/index.js";
import {defineProps} from 'vue'
import Cookies from 'js-cookie'
defineProps({
array: Array,
})
const go2Flow = (item) => {
//外接流程 链接
window.location.href = window.location.origin + `/flow/ssos.ashx?links=` + window.location.origin + `/flow/WF/MyFlow.htm?FK_Flow=${item.id}&flowtype=newflow&token=${Cookies.get('token')}`
}
</script>
<template>
<div @click="go2Flow(item)" class="w-full min-h-[80px] bg-white flex rounded-[4px] mb-3 "
v-for="(item,index) in array"
:key="index">
<div class="w-[70%] h-full">
<div class="flex h-1/2 items-center p-2 ">
<span>编号:{{ item.id }}</span>
</div>
<div class="flex h-1/2 items-center p-2 ">
<span>场地名称:{{ item.name }}</span>
</div>
</div>
<div class="w-[30%] min-h-[80px] flex items-center justify-center">
<img :src="getImage('byq')" class="max-w-1/2 h-1/2 bg-cover">
</div>
</div>
</template>
<style scoped>
</style>
<template>
<!-- 活动管理头部-->
<div class="w-full h-[54px] flex bg-white">
<div @click="back" class="w-[13%] text-gray-600 h-full flex
justify-center items-center text-[30px]">
<van-icon class="" name="arrow-left"/>
</div>
<div class=" w-[87%] h-full bg-red-900">
<van-search
v-model="search"
placeholder="请输入搜索关键词"
:click-right-icon="searchFunction"
>
<template #left-icon></template>
<template #right-icon>
<van-icon @click="searchFunction" name="search"/>
</template>
</van-search>
</div>
</div>
</template>
<script setup>
import router from "../router/index.js";
import {getCurrentInstance, ref, defineProps, defineEmits} from "vue";
import * as hooks from '@/hooks/index.js'
const props = defineProps({
path: {
type: String,
default: 'welcome'
},
functionActionFlag: {
type: Boolean,
default: false,
}
})
const emit = defineEmits(['searchFun', 'searchPeople'])
function back() {
hooks.go2Router(props.path)
}
const search = ref('')
function searchFunction() {
//functionActionFlag 防止同界面 多个搜索框。 false 执行searchFun true 执行searchPeople
props.functionActionFlag === false ? emit('searchFun', search.value) : emit('searchPeople', search.value)
}
defineExpose({
search,
})
</script>
<style>
</style>
<template>
<!-- 活动管理卡片-->
<div class="w-full h-[240px]
bg-white rounded-[8px] mb-4
">
<div class="relative p-3 w-full h-[18%] border-b-[1px] flex items-center ">
<span class="font-black text-gray-600">{{ item.name }}</span>
<span class="text-[14px] text-gray-400 ">{{ item.phone }}</span>
<div class="w-[50px] h-[50px] absolute right-2 top-3">
<slot name="image"></slot>
</div>
</div>
<div class=" p-3 w-full h-[60%]">
<div class="w-full h-1/4 flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">钥匙名称</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.key_name }}
</div>
</div>
<div class="w-full h-1/4 flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">钥匙编号</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.key_code }}
</div>
</div>
<div class="w-full h-1/4 flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">借出时间</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.borrow_time }}
</div>
</div>
<div class="w-full h-1/4 flex">
<div class="w-1/3 h-full">
<span class="text-gray-600">归还时间</span>
</div>
<div class="text-gray-600 w-2/3 h-full flex justify-end">
{{ item.return_time }}
</div>
</div>
</div>
<div class=" p-3 w-full h-[22%] border-t-[1px] flex justify-between">
<slot name="default"></slot>
</div>
</div>
</template>
<script setup>
import {defineProps} from 'vue'
const props = defineProps({
item: Object,
})
</script>
<style scoped>
</style>
<!--借出 归还钥匙 列表 卡片-->
<template>
<div v-for="(item,index) in props.array" :key="index">
<van-radio-group v-model="checked.data">
<!-- <cs-header :functionActionFlag="true" @searchPeople="searchPeople"/>-->
<div @click="checked.data = item" class="w-full min-h-[90px] rounded-2 p-2 flex bg-white mb-3">
<div class="w-[70%]">
<div class="w-full h-1/3 flex items-center ">
<span class="font-bold text-[15px]">{{ item.key_name }}</span>
<span class="text-[12px] text-gray-400">({{ item.key_code }} )</span>
</div>
<div class="w-full h-1/3 flex items-center">
<span class="text-[14px] text-gray-400 ">{{ item.place_name }} | <span
>
<span
class="font-bold">{{ ['可借', '可归还', '维护中'][item.state] }}</span>;
</span>
</span>
</div>
<div class="w-full h-1/3 flex items-center">
<van-radio :name="item"></van-radio>
</div>
</div>
<div class="w-[30%] ">
<img :src="getImage('guihuanyaoshi')" class="bg-cover w-full h-full">
</div>
</div>
</van-radio-group>
</div>
</template>
<script setup>
import {ref, defineProps, reactive, defineEmits} from 'vue'
import {getImage} from "../../hooks/index.js";
import Cookies from "js-cookie";
import * as api from '../../util/request/dist/controller/index.js'
import * as hooks from '../../hooks/index.js'
const checked = reactive({
data: {}
})
const props = defineProps({
array: {
type: String,
default: [],
},
keyTrackId: {
//钥匙轨迹id
type: String,
},
lenOrReturnKeyStateValue: {
//借用或归还 状态 1 借用 2 归还
type: Number,
}
})
const emit = defineEmits(['lendOrReturnKeys', 'keyOut',
'getData'])
function lendOrReturnKeys() {
// 父组件 触发 借出钥匙或归还钥匙
if (checked.data) {
let data = {
"key_track_id": props.keyTrackId,
"key_id": checked.data.id,
"userid": JSON.parse(Cookies.get('site-user-info')).userid,
"state": props.lenOrReturnKeyStateValue
}
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.postApiKeyKeyLendOrReturn(data)
//操作成功 刷新 父组件 详情和钥匙列表状态
if (res.code === 1) {
emit('keyOut', '')
emit('getData', '')
checked.data = '' // 成功清空选中状态
setTimeout(() => hooks.go2Router('keyManagement'), 1000)
}
return res
})
})
}
}
defineExpose({lendOrReturnKeys})
</script>
<style scoped>
</style>
<template>
<!-- 底部分页-->
<div class=" w-full h-[55px] page">
<van-pagination @change="pageChange" v-model="currentPage" :total-items="props.total" mode="simple"/>
</div>
</template>
<script setup>
import {ref, defineProps, defineEmits} from "vue";
const currentPage = ref(1)
const props = defineProps({
page_index: {
type: Number,
default: 1
},
page_size: {
type: Number,
default: 10
},
total: {
type: Number,
default: 0
},
})
const emit = defineEmits(['pageChange'])
function pageChange(e) {
//获取当前页数 提供给父级组件
emit('pageChange', e)
}
</script>
<style scoped>
.page {
--van-pagination-height: 55px
}
</style>
<template>
<van-popup
v-model:show="props.show"
position="bottom"
:style="{ height: props.height+'%' }"
:close-on-click-overlay="false"
>
<!-- @click-close-icon="closePopUp"-->
<template #default>
<slot name="content"></slot>
</template>
</van-popup>
</template>
<script setup>
// 接受show 通过closePopUp 方法触发自定义方法控制show的值进行关闭
import {ref, defineProps, inject, defineEmits, getCurrentInstance, onMounted} from "vue";
const asc = getCurrentInstance().appContext.config.globalProperties
const show = ref(true)
const props = defineProps({
show: Boolean,
height: {
type: Number,
default: 90
}
})
// const emit = defineEmits(['actionPopUp'])
//
// function closePopUp() {
// emit('actionPopUp', false)
// }
</script>
<style>
</style>
<template>
<!-- 场地管理卡片-->
<div class="w-full min-h-[90px] rounded-[8px] p-2 flex bg-white mb-3">
<div class="w-[70%]">
<div class="w-full h-1/3 flex items-center">
<span class="font-bold text-[15px]">{{ props.item.place_name }}</span>
<!-- <span class="text-[12px] text-gray-400">({{ props.item.place_code }})</span>-->
</div>
<div class="w-full h-1/3 flex items-center">
<span class="text-[14px] text-gray-400 ">{{ props.item.place_type_name }} | <span
>
{{
props.item.place_address
}}
</span>
</span>
</div>
<div class="w-full h-1/3 flex items-center">
<div class="w-[35%] h-[80%] bg-blue-200 flex items-center justify-center">
<span class="text-[12px] text-blue-500 font-bold">容纳人数:{{ props.item.capacity }} </span>
</div>
<div class="ml-3 w-[45%] h-[80%] bg-orange-200 flex items-center justify-center">
<span class="text-[12px] text-amber-500 font-bold">最低申请人数:{{ props.item.threshold }}</span>
</div>
</div>
</div>
<div class="w-[30%] ">
<img :src="getImage('guihuanyaoshi')" class="bg-cover w-full h-full">
</div>
</div>
</template>
<script setup>
import {getImage} from "../hooks/index.js";
const props = defineProps({
item: {
type: Object,
default: ''
}
})
</script>
<style scoped>
</style>
<template>
<!-- 场地管理header-->
<div class="w-full h-[54px] flex bg-white justify-center">
<div class=" w-[75%] h-full bg-red-900">
<van-search
v-model="search"
placeholder="请输入搜索关键词"
:click-right-icon="searchFunction"
>
<template #left-icon></template>
<template #right-icon>
<van-icon @click="searchFunction" name="search"/>
</template>
</van-search>
</div>
<div class="w-[25%] h-full">
<van-dropdown-menu class="aaa flex items-center h-[90%] mt-[5px] overflow-x-auto">
<van-dropdown-item v-model="value1" :options="props.option"/>
</van-dropdown-menu>
</div>
</div>
</template>
<script setup>
import {ref, defineProps, defineEmits, watch} from "vue";
const props = defineProps({
option: Array,
selectDefaultValue: [String, Number],
})
//
const value1 = ref(props.selectDefaultValue);
const search = ref('');
const emit = defineEmits(['searchFun', 'searchPeople', 'changeSelect'])
watch([() => value1.value], (newValue, oldValue) => {
changeSelect(newValue[0])
})
function searchFunction() {
//functionActionFlag 防止同界面 多个搜索框。 false 执行searchFun true 执行searchPeople
emit('searchFun', search.value)
}
function changeSelect(value) {
//下拉框搜索
emit('changeSelect', value)
}
</script>
<style scoped>
.aaa {
--van-dropdown-menu-shadow: red;
}
</style>
<template>
<Tree :data="data" show-checkbox @on-check-change="checkChange"></Tree>
</template>
<script setup>
import {getCurrentInstance,} from 'vue'
const data = [
{
title: 'parent 1',
expand: true,
children: [
{
title: 'parent 1-1',
expand: true,
children: [
{
title: 'leaf 1-1-1'
},
{
title: 'leaf 1-1-2'
}
]
},
{
title: 'parent 1-2',
expand: true,
children: [
{
title: 'leaf 1-2-1'
},
{
title: 'leaf 1-2-1'
}
]
}
]
}
]
const asc = getCurrentInstance()
function checkChange(currenAlltItem, currentItem) {
console.log("🚀🚀🚀,", currenAlltItem, currentItem)
}
const props = defineProps({
placeTypeId: {
type: String,
default: ''
}
})
defineExpose({
data,
})
</script>
import router from "../router/index.js";
import * as images from '../states/index.js'
import {closeToast, showConfirmDialog, showFailToast, showLoadingToast, showNotify, showSuccessToast} from "vant";
import 'vant/lib/index.css';
import Cookies from "js-cookie";
import * as api from '../util/request/dist/controller/index.js'
export const getImage = (imageName) => {
//通过 imageName 参数 获取图片
return images[imageName].default
}
export const tabChange = (e) => {
let object = {
"0": () => router.push({
name: 'myActivity'
}),
"1": () => router.push({
name: 'keyManagement'
}),
"2": () => router.push({
name: 'welcome'
}),
"3": () => router.push({
name: 'siteManagement'
}),
}
object[e]()
}
export const go2Router = (path) => {
router.push({
name: path
})
}
export async function myEncapsulationFunction(fun, isShowSuccessText = false, loadingText = '正在提交') {
/**
* isShowSuccessText=>true||false
*
* */
const toast = showLoadingToast({
duration: 0,
forbidClick: true,
message: loadingText,
});
let res = await fun()
if (isShowSuccessText) return toast.close();
try {
switch (res.code) {
case 1 :
toast.close()
showSuccessToast({
message: res.msg
})
setTimeout(() => closeToast(), 1500)
break;
default :
toast.close()
showFailToast({
message: res.msg_detail
})
setTimeout(() => closeToast(), 1500)
}
return res
} catch (e) {
toast.close()
showFailToast({
message: res.msg_detail
})
setTimeout(() => closeToast(), 1500)
}
}
/*export async function myEncapsulationFunction(fun) {
// Spin.show()
let res = await fun()
try {
switch (res.code) {
case 1 :
showNotify({type: 'success', message: res.msg});
break;
default :
showNotify({type: 'danger', message: res.msg_detail});
}
// Spin.hide()
return res
} catch (e) {
showNotify({type: 'danger', message: res.msg_detail || '报错,无msg_detail'});
}
}*/
export function getInitListRequest(fun) {
try {
fun()
return false
} catch (e) {
showNotify({type: 'danger', message: e});
return false
}
}
export function publicConfirm(publicFunction) {
// 公共弹窗删除
const beforeClose = (action) => {
return true
}
showConfirmDialog({
title: '提示',
message:
'是否继续执行此操作?',
confirmButtonColor: '#2aa9ff',
beforeClose,
})
.then(async () => {
// on confirm
await publicFunction()
beforeClose()
})
.catch(() => {
// on cancel
});
}
function areElementsAdjacent(arr, element1, element2) {
//相邻
// 首先对数组进行排序
arr.sort((a, b) => a - b);
// 获取元素在排序后的数组中的索引
let index1 = arr.indexOf(element1);
let index2 = arr.indexOf(element2);
// 如果两个索引相等,或者第二个索引等于第一个索引加1,则它们是相邻的
return index1 !== -1 && index2 !== -1 && (index1 === index2 || index2 === index1 + 1);
}
//遍历Tree结构 加入字段
export function addTitleToTree(tree) {
tree.forEach(node => {
node.title = node.commodity_name;
if (node.children && node.children.length > 0) {
addTitleToTree(node.children);
}
});
return tree;
}
export const store = {
/**
* 状态管理
* 状态 index
* */
state: (index) => {
// 活动申请状态
return ['', '审批中', '已取消', '驳回', '审批通过', '邀请中', '邀请超时', '待使用', '使用中', '已结束', '强势结束'][index]
},
overtime_state: (index) => {
//加时状态
return ['未加时', '申请中', '加时', '不通过'][index]
},
key_state: (index) => {
//钥匙借用状态
return ['未领取', '借出', '归还'][index]
},
is_del: (index) => {
//是否删除
return ['否', '是'][index]
},
is_evaluate: (index) => {
//是否评价
return ['否', '是'][index]
},
dtKeyState: (index) => {
//是否评价
return ['可借', '借出', '维护中'][index]
},
activityKey: (index) => {
//是否评价
return ['未绑定', '借用', '归还'][index]
},
}
export const getUserInfo = () => {
return JSON.parse(Cookies.get('site-user-info'))
}
export function getRole() {
//获取用户取权限 1 2 场地管理员
let array = []
JSON.parse(Cookies.get('site-user-info')).role_and_power.map(cur => {
array.push(cur.role_id)
})
return array.includes("2") //是否场地管理员
}
export async function isShowIndexCount() {
//主页四个转台显隐
return await api.getApiCommonGetHomeReveal().then(res => {
return Boolean(res.response)
})
}
export async function isShowUseingInvite() {
//主页四个转台显隐
return await api.getApiCommonGetUseInviteReveal().then(res => {
return Boolean(res.response)
})
}
import {createApp, getCurrentInstance, provide} from 'vue'
import './style.css'
import App from './App.vue'
import router from "./router/index.js";
import 'animate.css' //引入
import VueCookies from 'vue-cookies'
import VConsole from 'vconsole';
import mitt from "mitt";
import '@ysx-libs/vue-virtual-tree/style.css';
import vueQr from 'vue-qr/src/packages/vue-qr.vue'
//活动管理各状态 头部、分页、弹窗、卡片
import csHeader from '../src/components/header.vue'
import csCard from '../src/components/card.vue'
import csPage from '../src/components/page.vue'
import csPopUp from '../src/components/popup.vue'
import csSiteCard from './components/siteCard.vue'
import csSiteSelectHeader from './components/siteSelectHeader.vue'
import csFlowCard from './components/flowCard.vue'
import csBorrowingAndReturningListCard from '../src/components/key/borrowingAndReturningListCard.vue'
//活动管理详情页 栏目
import csActivityData from '../src/pages/welcome/compontes/detail/components/activityData.vue'
import csComment from '../src/pages/welcome/compontes/detail/components/comment.vue'
import csPlayers from '../src/pages/welcome/compontes/detail/components/players.vue'
import csTrack from '../src/pages/welcome/compontes/detail/components/track.vue'
import csKey from '../src/pages/welcome/compontes/detail/components/key.vue'
import csKeyQrCode from '../src/pages/keyManagement/components/keyQrcode.vue'
import dtCard from '../src/components/activityManagementDetail/detailCard.vue'
import csChooseImage from '../src/pages/welcome/compontes/wxChooseImage/indx.vue'
//统一封装和解耦的文件供全局使用 图片、自定义hooks、接口
import * as images from './states/index.js'
import * as hooks from './hooks/index.js'
import * as api from "../src/util/request/dist/controller/index.js"
import csKeyCard from '../src/components/key/keyCard.vue'
const backAscHome = () => {
//基于用户权限返回对应OA主页
hooks.getRole() ? window.location.href = "/TeacherMobOA" : window.location.href = "/StudentMobileOA"
}
export const app = createApp(App)
import LiquorTree from 'liquor-tree'
app.component('LiquorTree', LiquorTree)
import {Tree} from 'view-ui-plus';
import 'view-ui-plus/dist/styles/viewuiplus.css'
app.component('Tree', Tree);
//使用测试按钮Vxonsole
// const vConsole = new VConsole();
//使用cookie
app.config.globalProperties.$cookies = VueCookies
//所有方挂载到原型链
// app.config.globalProperties.asc = api
app.provide('asc', api)
//自定义底部tabbar 策略路由跳转
app.config.globalProperties.tabChange = hooks.tabChange
//自定义返回上一级
app.config.globalProperties.back = () => {
router.back()
}
//汇总图片资源 挂载到全局
app.config.globalProperties.images = images
//封装hooks 文件 挂载全局
app.config.globalProperties.hooks = hooks
//通过mitt 实现全局事件总线
app.config.globalProperties.$bus = new mitt()
app.component('csHeader', csHeader)
app.component('csCard', csCard)
app.component('csPage', csPage)
app.component('csPopUp', csPopUp)
app.component('csSiteCard', csSiteCard)
app.component('csSiteSelectHeader', csSiteSelectHeader)
app.component('csFlowCard', csFlowCard)
app.component('csKeyCard', csKeyCard)
app.component('csKeyQrCode', csKeyQrCode)
app.component('csBorrowingAndReturningListCard', csBorrowingAndReturningListCard)
app.component('csChooseImage', csChooseImage)
// 活动管理卡片列表详情页
app.component('csActivityData', csActivityData) //活动数据
app.component('csComment', csComment) //评价
app.component('csPlayers', csPlayers) // 参与人
app.component('csTrack', csTrack) //轨迹
app.component('csKey', csKey)
app.component('dtCard', dtCard) //活动详情页卡片
app.provide('backAscHome', backAscHome)
app.component('vueQr', vueQr)
app.use(router)
app.mount('#app')
<template>
<van-nav-bar
left-text="返回"
left-arrow
@click-left="onClickLeft"
></van-nav-bar>
<van-empty style="width: 100%;height: 100%" image="error" description="异常"/>
<!-- <van-button primary='success' @click="onClickLeft">返回</van-button>-->
</template>
<script setup>
import {useRouter} from "vue-router";
import {showNotify} from "vant";
const router = useRouter()
const onClickLeft = () => showNotify({type: 'danger', message: '用户验证不通过,请重新登录'});
// const onClickLeft = () => router.replace({name: 'welcome'})
</script>
<template>
<div style="display: flex; justify-content: center; margin-top: 50%">
<van-loading color="#1989fa" size="38px" vertical> 登录中</van-loading>
</div>
<!-- {{router.currentRoute.value.query.token}}-->
</template>
<script setup>
// import router from "../router/index.js";
import Cookies from 'js-cookie'
import {useRouter} from 'vue-router'
import {onMounted} from 'vue'
import * as api from '../api/index.js'
import {CheckLoginTest} from "../api/index.js";
const router = useRouter()
const getTokenAction = async (date) => {
const res = await api.SSOPC(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
// access_token.token_content
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
const getTokenActionWx = async (date) => {
const res = await api.wxsan(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
const getToken = async () => {
let policyObject = {
"wx": async () => {
//asc
let date = {
token: router.currentRoute.value.query.token
}
const res = await api.wx(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
},
"asc": async () => {
//ASC单点
let date = {
token: router.currentRoute.value.query.token,
}
await getTokenAction(date)
},
"first": async () => {
//AIC单点
let date = {
sign: router.currentRoute.value.query.sign,
code: router.currentRoute.value.query.code,
timestamp: router.currentRoute.value.query.timestamp,
}
await getTokenActionWx(date)
},
"test": async () => {
//测试token
const res = await api.CheckLoginTest()
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
}
//使用策略
if (router.currentRoute.value.query.token === 'test') await policyObject['test']()
else {
policyObject[router.currentRoute.value.query.type]()
}
}
onMounted(() => {
getToken()
})
</script>
<!--消息推送单点界面-->
<template>
<div style="display: flex; justify-content: center; margin-top: 50%">
<van-loading size="38px" color="#1989fa" vertical> 登录中</van-loading>
</div>
<!-- {{router.currentRoute.value.query.token}}-->
</template>
<script setup>
// import router from "../router/index.js";
import Cookies from 'js-cookie'
import {useRouter} from 'vue-router'
import {onMounted} from 'vue'
import * as api from '../api/index.js'
import {CheckLoginTest} from "../api/index.js";
const router = useRouter();
const getTokenAction = async (date) => {
//ASC PC端
const res = await api.SSOPC(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
// access_token.token_content
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
const getTokenActionWx = async (date) => {
// first
const res = await api.wxsan(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
const getToken = async () => {
let policyObject = {
"wx": async () => {
//asc 移动端
let date = {
token: router.currentRoute.value.query.token
}
const res = await api.wx(date)
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
//消息推送单点完成 获取id 跳转 详细页
let id = router.currentRoute.value.query.id
await router.push({
path: '/indexDetail',
query: {
//活动Id 用与输出 活动详细信息
id: id,
pushMessage: 1, //区别是否是消息推送进入的详情页 用于返回上一页 或 主页
}
})
}
},
"asc": async () => {
//ASC PC端
let date = {
token: router.currentRoute.value.query.token
}
await getTokenAction(date)
},
"first": async () => {
//AIC 单点
let date = {
sign: router.currentRoute.value.query.sign,
code: router.currentRoute.value.query.code,
timestamp: router.currentRoute.value.query.timestamp,
}
await getTokenActionWx(date)
},
"test": async () => {
//测试token
const res = await api.CheckLoginTest()
if (res === void 0) {
await router.replace({
name: '403'
})
} else if (res.response.access_token.token_content !== '') {
Cookies.set('site-management-token', res.response.access_token.token_content)
Cookies.set('time', res.response.access_token.expires)
const user = await api.GetTokenInfo()
Cookies.set('site-user-info', JSON.stringify(user.response))
await router.replace({
name: 'myActivity'
})
}
}
}
//使用策略
policyObject[router.currentRoute.value.query.type]()
}
onMounted(() => {
getToken()
})
</script>
<template>
<van-nav-bar
left-text="返回"
left-arrow
@click-left="onClickLeft"
></van-nav-bar>
<van-empty style="width: 100%;height: 100%" image="error" description="暂无权限!"/>
<!-- <van-button primary='success' @click="onClickLeft">返回</van-button>-->
</template>
<script setup>
import {useRouter} from "vue-router";
const router = useRouter()
const onClickLeft = () => router.replace({name: 'welcome'});
</script>
<script setup>
import {onMounted, ref} from "vue";
onMounted(() => {
// window.location.href = 'https://asc.hnasct.cn/flow/WF/MyFlow.htm?FK_Flow=439&flowtype=newflow'
})
const src = ref('https://asc.hnasct.cn/flow/WF/MyFlow.htm?FK_Flow=439&flowtype=newflow')
</script>
<template>
<div>
<!-- <iframe :src="src"-->
<!-- class="w-screen h-screen"></iframe>-->
</div>
</template>
<style scoped>
</style>
<!--扫码跳转的钥匙详细页 用于选中钥匙 借出 或归还-->
<template>
<div class="w-screen h-screen bg-gray-100 box-border relative">
<!-- header h-54px-->
<!-- <cs-header :path="'myActivity'" @search-fun="searchFun"></cs-header>-->
<div class="w-full h-[54px] flex bg-white">
<div class=" w-full h-full flex items-center justify-center">
<span>钥匙借还记录详情 </span>
</div>
</div>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] overflow-y-auto">
<div v-for="(item,index) in init.array" :key="index">
<!-- 钥匙详情-->
<dt-card :array="item"></dt-card>
</div>
</div>
<!-- footer h-55px-->
<div class="w-full h-[55px] bg-white flex items-center justify-around shadow shadow-gray-600">
<van-button v-if="init.key.state !==2" @click="keyOut" type="primary" round class="w-[45%] text-gray-600" plain>
{{ ['借出', '归还',][init.key.state] }}
</van-button>
<van-button class="w-[45%]" round @click="router.push({name:'keyManagement'})">取消</van-button>
</div>
</div>
<cs-pop-up :show="init.key.show" :height="90">
<template #content>
<!-- //钥匙卡片-->
<div class="w-full h-[90%] bg-gray-100 overflow-y-auto p-3">
<cs-key-card ref="lendOrReturnKeysRef"
:array="init.key.array"
:keyTrackId="init.key.key_track_id"
:lenOrReturnKeyStateValue="init.key.lenOrReturnKeyStateValue"
@keyOut="keyOut"
@getData="getData"
></cs-key-card>
</div>
<div class="w-full h-[10%] flex items-center justify-between p-3 shadow-gray-600 shadow">
<van-button style="width: 48%" round block @click="init.key.show = false;">关闭</van-button>
<van-button style="width: 48%" round block type="primary" @click="lendOrReturnKeys">提交</van-button>
</div>
</template>
</cs-pop-up>
</template>
<script setup>
import spzlogo from '../../../../states/icon/ing.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted, inject} from 'vue'
import router from "../../../../router/index.js";
import * as api from '../../../../../src/util/request/dist/controller/index.js'
import * as hooks from "../../../../hooks/index.js";
import {getImage} from "../../../../hooks/index.js";
import CsKeyCard from "../../../../components/key/keyCard.vue";
const asc = getCurrentInstance().appContext.config.globalProperties
const checked = ref('1');
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
data: {
array: []
},
place: {
id: ''
},
key: {
lenOrReturnKeyStateValue: '',
state: '',
key_track_id: '',
array: [],
show: false,
init: {
"code_name": "",
"place_id": asc.$route.query.place_id,
"state": "",
"page_index": 1,
"page_size": 10
}
}
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
let lendOrReturnKeysRef = ref(null)
function lendOrReturnKeys() {
//借出钥匙
lendOrReturnKeysRef.value.lendOrReturnKeys()
}
function keyOut() {
//获取钥匙场地列表 用于借出
init.key.show = true
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyList(init.key.init).then(res => {
init.key.array = res.response.data
})
})
}
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化数据
hooks.getInitListRequest(() => {
api.getApiKeyGetKeyTrackInfoByActivity({
activity_id: asc.$route.query.activity_id,
}).then(res => {
if (res.response) {
let array = []
//获取此项相关输入 插入数组
array.push(
[
{label: '活动申请人姓名', value: res.response.name},
{label: '活动申请人卡号', value: res.response.card},
{label: '钥匙编号', value: res.response.key_code},
{label: '钥匙名称', value: res.response.key_name},
{label: '借用状态', tag: hooks.store.activityKey(res.response.state)},
],
[
{label: '借用人', value: res.response.borrow_card},
{label: '借用人卡号', value: res.response.borrow_name},
{label: '借出时间', value: res.response.borrow_time},
{label: '借出操作人', value: res.response.borrow_operate_card},
],
[
{label: '归还人', value: res.response.return_card},
{label: '归还人卡号', value: res.response.return_name},
{label: '归还时间', value: res.response.return_time},
{label: '归还操作人', value: res.response.return_operate_card},
],
)
//获取处理完的数组
init.array = array
//获取钥匙轨迹id
init.key.key_track_id = res.response.id
//获取钥匙状态 进行借还判断 state === 1 传2 表 归还 state === 0 传1 表 借用
init.key.state = res.response.state //按钮鉴别
//借出归还状态
if (res.response.state === 0) init.key.lenOrReturnKeyStateValue = 1
if (res.response.state === 1) init.key.lenOrReturnKeyStateValue = 2
}
})
})
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<template>
<div class="w-screen h-screen bg-gray-200">
<div class="w-full h-[54px] flex bg-white">
<div class=" w-full h-full flex items-center justify-center">
<span>借还钥匙详情</span>
</div>
</div>
<div class="
w-full
min-h-[calc(100%-109px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card v-for="(item,index) in init.array" :key="index" :array="item"></dt-card>
</div>
<div class="w-full h-[55px] shadow bg-white shadow-gray-600 flex justify-center items-center">
<van-button type="default" round class="w-[48%]" @click="$router.back()">返回</van-button>
</div>
</div>
</template>
<script setup>
import {onMounted, defineProps, getCurrentInstance, reactive} from "vue";
import * as api from '../../../../util/request/dist/controller/index.js'
import * as hooks from '../../../../hooks/index.js'
const asc = getCurrentInstance().appContext.config.globalProperties
const init = reactive({
data: {
initDataKeys: [
//决定插入数据顺序
],
values: [],
title: [],
},
useKeys: [
//想要的数据key 数组 标识作用 不决定插入数据顺序
[],
],
array: [
//处理完的完整数组,给到组件输出
]
})
function getData() {
//初始化数据
hooks.getInitListRequest(() => {
api.getApiKeyGetKeyTrackInfo({
id: asc.$route.query.id
}).then(res => {
if (res.response) {
return init.array.push([
{label: '钥匙名称', value: res.response.key_name},
{label: '钥匙编号', value: res.response.key_code},
{label: '可接状态', tag: ['', '借出', '归还'][res.response.state]},
],
[
{label: '借用人名称', value: res.response.borrow_name},
{label: '借用用卡号', value: res.response.borrow_card},
{label: '借出时间', value: res.response.borrow_time},
{label: '借出操作人', value: res.response.borrow_operate_card},
],
[
{label: '归还人名称', value: res.response.return_name},
{label: '归还人卡号', value: res.response.return_card},
{label: '归还时间', value: res.response.return_time},
{label: '归还操作人', value: res.response.return_operate_card},
]
)
}
})
})
}
onMounted(() => {
getData()
})
</script>
<style scoped>
</style>
<template>
<div class="w-full h-full flex items-center justify-center flex-wrap ">
<div @click="handleScanQR" class="w-[180px] h-[180px]
bg-blue-400 rounded-full
flex justify-center items-center
active:bg-blue-400
active:scale-[1.2]
">
<img :src="hooks.getImage('sys')" class="w-1/2 h-1/2">
</div>
<div>
点击“按钮”,进行钥匙二维码扫描
</div>
</div>
</template>
<script>
import * as api from '../../../api/index.js';
import wx from "weixin-js-sdk";
import {showDialog, showSuccessToast} from "vant";
import * as hooks from "../../../hooks/index.js";
export default {
computed: {
hooks() {
return hooks
}
},
data() {
return {
searchValue: "",
loading: false,
timer: '',
};
},
mounted() {
this.wxScanCode();
},
methods: {
onClickLeft() {
window.location.href = '/WX/eicrs/home/teacenter'
},
getData() {
},
// 微信初始化配置
wxScanCode() {
const params = {
url: window.location.href.replace(window.location.hash, ""),
};
api.GetWxConfig(params).then((result) => {
let data = result;
wx.config({
debug: false,
appId: data.appId, // 必填,公众号的唯一标识
timestamp: data.timeStamp, // 必填,生成签名的时间戳
nonceStr: data.nonceStr, // 必填,生成签名的随机串
signature: data.signature, // 必填,签名,见附录1
jsApiList: ["scanQRCode", "checkJsApi"],
});
wx.ready(() => {
console.log("设备已经可以使用");
});
wx.error(function (res) {
console.log("设备已经无法使用");
});
});
},
// 扫码
async handleScanQR() {
wx.scanQRCode({
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码
success: async (res) => {
window.location.href = res.resultStr
},
fail: (err) => {
alert(JSON.stringify(err))
}
});
},
},
};
</script>
<style>
</style>
<!--借用钥匙-->
<template>
<div class="w-screen h-screen bg-gray-100 box-border">
<!-- header-->
<cs-header :path="'keyManagement'" @search-fun="searchFun"></cs-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-card :item="item">
<template v-slot:image>
<img :src="dsy">
</template>
<template v-slot:default>
<div class="w-full flex justify-between items-center">
<van-button @click="inKey(item)" class="w-[48%]" plain size="small"
:type="['primary','success','warning'][item.key_state]">
{{ ['生成借用钥匙二维码', '生成归还钥匙二维码', '已归还'][item.key_state] }}
</van-button>
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
<!-- 须知-->
<van-dialog v-model:show="init.key.show" title="钥匙信息二维码">
<div class="flex justify-center items-center w-full ">
<vue-qr
:text="init.key.src"
:size="200"></vue-qr>
</div>
<template #footer>
<div class="w-full h-[60px] flex justify-center items-center border border-solid">
<van-button style="width: 90%" type="primary" round block
@click="init.key.show = false;">关闭
</van-button>
</div>
</template>
</van-dialog>
</template>
<script setup>
import dsy from '../../states/icon/await.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted} from 'vue'
import router from "../../router/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import * as hooks from "../../hooks/index.js";
import CsKeyCard from "../../components/key/keyCard.vue";
import CsKeyQrCode from "./components/keyQrcode.vue";
import {showNotify} from "vant";
const asc = getCurrentInstance().appContext.config.globalProperties
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
key: {
show: false,
src: '',
},
notice: {
//须知
show: false,
close: true,
s: 5,
timer: '',
content: '',
id: '',
},
page: {
//活动列表
page_index: 1,
page_size: 10,
total: 0,
},
people: {
//邀请
timer: '',
id: '',
show: false,
activeIds: [],
activeIndex: 0,
items: [
{
text: '学生',
children: [],
},
{
text: '教师',
children: [],
},
],
init: {
user_type: 0,
keyword: '',
}
},
data: {
array: []
},
adjust: {
//调动
show: false,
id: '',
formValidate: {}
},
timeRange: false,
placeType: false,
place: false,
beginTime: false,
endTime: false,
commodity: false,
date: false,
timeRangeText: '',
dateText: "",
placeTypeText: '',
placeText: '',
beginTimeText: '',
endTimeText: '',
commodityText: '',
placeTypeArray: '',
placeArray: '',
beginTimeArray: '',
endTimeArray: '',
commodityArray: [],
minDateStart: '',
maxDateStart: '',
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function inKey(item) {
//拼接二维码链接
if (item.key_state !== 2) {
init.key.src = `/placemanage/wx/#/keyDetailInAndReturn?activity_id=${item.id}&place_id=${item.place_id}`
init.key.show = true
} else {
showNotify({type: 'danger', message: '已归还钥匙'});
}
// console.log("🚀🚀 init.key.src🚀,", init.key.src)
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 14,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiActivityGetActivityListByWxUser(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
getData()
document.title = '借还钥匙'
})
</script>
<style scoped>
</style>
<template>
<div class="container1">
<div class="header flex justify-center content-start flex-wrap ">
<div class="mb-3 flex w-full h-[50px] rounded-[8px]">
<div class="w-1/2 h-full mt-1 ml-1">
<div @click="back" style="background: white" class="child flex justify-center items-center">
<van-icon style="font-size: 22px;font-weight: bold" name="wap-home-o"/>
</div>
</div>
<div class="w-1/2 h-full flex justify-end items-center">
<div class="mx-2">
<div class="font-bold ml flex justify-end">{{ hooks.getUserInfo().name }}</div>
<div class="text-[14px] text-neutral-400">{{ hooks.getUserInfo().card_number }}</div>
</div>
<div>
<van-image
round
width="40px"
height="40px"
:src="getImage('tx')"
/>
</div>
</div>
</div>
<!-- 钥匙借用-->
<div class="mb-3 w-full flex flex-nowrap justify-between">
<van-cell-group v-if="!hooks.getRole()" @click="keyManagement('borrowAKey')" inset
class="w-full h-[70px] eee flex items-center ">
<img :src="getImage('jieyongyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">借还钥匙</div>
</van-cell-group>
<van-cell-group v-if="hooks.getRole()" @click="keyManagement('borrowAKey')" inset
class="w-[48%] h-[70px] aaa flex items-center ">
<img :src="getImage('jieyongyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">借还钥匙</div>
</van-cell-group>
<!-- <van-cell-group @click="keyManagement('returnTheKey')" v-if="true" inset-->
<!-- class="w-[48%] h-[70px] bbb flex items-center ">-->
<!-- <img :src="getImage('guihuanyaoshi')" class="ml-5 w-[35px] h-[35px]">-->
<!-- <div class="ml-3 text-white font-bold">归还钥匙</div>-->
<!-- </van-cell-group>-->
<van-cell-group v-if="hooks.getRole()" @click="keyManagement('keyScanCode')" inset
class="w-[48%] h-[70px] bbb flex items-center ">
<img :src="getImage('guihuanyaoshi')" class="ml-5 w-[35px] h-[35px]">
<div class="ml-3 text-white font-bold">钥匙扫码</div>
</van-cell-group>
</div>
<!-- 钥匙借还记录-->
<div v-if="hooks.getRole()" @click="asc.hooks.go2Router('keyLoanAndReturnRecord')"
class="mb-3 ccc w-full bg h-[70px] flex items-center bg-white rounded-[9px] bg-cover">
<img :src="getImage('yaoshilogo')" class="ml-5 w-[40px] h-[40px]">
<div class="w-[220px] h-full flex items-center">
<div class=" h-[40px]">
<span class="ml-3 text-white text-[15px] font-bold">钥匙借还记录</span>
<div class=" ml-3 text-yellow-50 opacity-[0.7] text-[12px]">
<span>
钥匙借出记录 | 钥匙归还记录
</span>
</div>
</div>
</div>
<div class="w-[calc(100%-280px)]">
<div class="ml-3 text-white font-bold">
<div class="w-[45px] h-[20px] bg-yellow-100 rounded-[15px] flex items-center justify-center">
<span class="text-[11px] text-yellow-600 font-serif">去查看</span>
</div>
</div>
</div>
</div>
<!-- 我的借还记录-->
<div @click="asc.hooks.go2Router('myKeyLoanAndReturnRecord')"
class="mb-3 ddd w-full bg h-[70px] flex items-center bg-white rounded-[9px] bg-cover">
<img :src="getImage('wodejiehuanjilulogo')" class="ml-5 w-[40px] h-[40px]">
<div class="w-[220px] h-full flex items-center">
<div class=" h-[40px]">
<span class="ml-3 text-white text-[15px] font-bold">我的借还记录</span>
<div class=" ml-3 text-blue-50 text-[12px] opacity-[0.7]">
<span class="">
我的钥匙借用记录 | 我的归还钥匙记录
</span>
</div>
</div>
</div>
<div class="w-[calc(100%-280px)]">
<div class="ml-3 text-white font-bold">
<div class="w-[45px] h-[20px] bg-blue-100 rounded-[15px] flex items-center justify-center">
<span class="text-[11px] text-blue-600 font-serif">去查看</span>
</div>
</div>
</div>
</div>
</div>
<!-- 底部菜单-->
<div class="footer ">
<van-tabbar v-model="active" @change="tabChange">
<van-tabbar-item icon="home-o">我的活动
<template #icon>
<img :src="getImage('fm')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="search">钥匙
<template #icon>
<img :src="getImage('tc')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="home-o" v-if="hooks.getRole()">活动管理
<template #icon>
<img :src="getImage('fl')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
<van-tabbar-item icon="friends-o" v-if="hooks.getRole()">场地管理
<template #icon>
<img :src="getImage('fr')" class="w-[20px] h-[20px]"/>
</template>
</van-tabbar-item>
</van-tabbar>
</div>
</div>
<cs-pop-up v-if="objKey.data.borrowAKey" @borrowAKeyFalse="(e)=> objKey.data.borrowAKey = false">
<template v-slot:default>
1231
</template>
</cs-pop-up>
<cs-pop-up :show="init.keyQrcode.show" :height="70">
<!-- 钥匙扫码-->
<template #content>
<!-- //钥匙卡片-->
<div class="w-full h-[90%] bg-gray-100 overflow-y-auto p-3">
<cs-key-qr-code></cs-key-qr-code>
</div>
<div class="w-full h-[10%] flex items-center justify-center p-3 shadow-gray-600 shadow">
<van-button style="width: 48%" round block @click="init.keyQrcode.show = false;">关闭</van-button>
</div>
</template>
</cs-pop-up>
</template>
<script setup>
import router from "../../router/index.js";
import * as hooks from '../../hooks/index.js'
import tc from '../../states/icon/16.png'
import fl from '../../states/icon/18.png'
import fr from '../../states/icon/20.png'
import {getCurrentInstance, inject, nextTick, onMounted, provide, reactive, ref, watch,} from "vue"
import CsKeyQrCode from "./components/keyQrcode.vue";
function go2(name) {
router.push({
name: name
})
}
const show = ref(true)
const keyStrategy = {
// 钥匙策略
'borrowAKey': () => {
// return objKey.data.borrowAKey = !objKey.data.borrowAKey
go2('inKey')
},
'returnTheKey': () => {
},
'keyScanCode': () => {
init.keyQrcode.show = true
},
}
const init = reactive({
keyQrcode: {
show: false,
},
data: {
admin: '',
user: '',
}
})
const active = ref(1);
const asc = getCurrentInstance().appContext.config.globalProperties
const objKey = reactive({
data: {
borrowAKey: false,
}
})
//钥匙操作管理
const keyManagement = (key) => keyStrategy[key]()
const tabChange = (e) => {
// 底部菜单切换
asc.tabChange(e)
}
const getImage = (imageKey) => {
return asc.hooks.getImage(imageKey)
}
const backAscHome = inject('backAscHome')
const back = () => {
//返回asc 主界面
backAscHome()
}
function getRole() {
let array = []
hooks.getUserInfo().role_and_power.map(cur => {
array.push(cur.role_id)
})
init.data.admin = array.includes("2") //场地管理员
}
onMounted(() => {
document.title = "钥匙管理"
getRole()
})
</script>
<style scoped>
.aaa {
background-image: url("../../states/icon/zose.png");
background-size: cover;
}
.bbb {
background-image: url("../../states/icon/lanse.png");
background-size: cover;
}
.ccc {
background-image: url("../../states/icon/changhuangse.png");
background-size: cover;
}
.ddd {
background-image: url("../../states/icon/changlanse.png");
background-size: cover;
}
.eee {
background-image: url("../../states/icon/zisechangbeijing.png");
background-size: cover;
}
.child {
width: 40px;
height: 40px;
background: #f2f3f5;
border-radius: 4px;
}
>>> .van-cell-group--inset {
margin: 0;
border-radius: var(--van-cell-group-inset-radius);
overflow: hidden;
}
>>> .van-tabbar {
z-index: var(--van-tabbar-z-index);
display: flex;
box-sizing: content-box;
width: 100%;
height: 80px;
background: var(--van-tabbar-background);
}
</style>
<!--借还记录列表-->
<template>
<div class="container1">
<!-- header-->
<cs-site-select-header @change-select="changeSelect" @search-fun="searchFun"
:selectDefaultValue="searchCondition.data.state"
:option="init.key.array"></cs-site-select-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-borrowing-and-returning-list-card :item="item">
<template v-slot:image>
<img :src="getImage(`${ ['kejie','jiechu','guihuan'][item.state]}`)">
</template>
<template v-slot:default>
<div class="w-full h-full flex justify-end items-center ">
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-borrowing-and-returning-list-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import {getImage} from "../../hooks/index.js";
import router from "../../router/index.js";
import * as hooks from "../../hooks/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import {onMounted, reactive} from "vue";
const detail = (e) => {
router.push({
name: 'loanAndReturnDetail',
query: {
id: e
}
})
}
const init = reactive({
keyQrcode: {
show: false,
},
placeType: {
array: []
},
data: {
array: []
},
key: {
array: [
{text: '借出', value: 1},
{text: '归还', value: 2},
]
}
})
function getPlaceType() {
//获取场地类型
hooks.getInitListRequest(() => {
api.getApiCommonGetPlaceTypeSelect().then(res => {
let array = []
res.response.map(cur => {
array.push({text: cur.name, value: cur.id})
})
init.placeType.array = array
})
})
}
const searchCondition = reactive({
//场地初始化
data: {
// JSON.parse(Cookies.get('site-user-info')).role_and_power.role_id,
"key_code_name": "",
"card_name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.card_name = e
getData()
}
function changeSelect(e) {
//下拉框
searchCondition.data.state = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyTrackListByPlaceAdmin(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
document.title = "钥匙借还记录"
getData()
getPlaceType()
})
</script>
<style scoped>
</style>
<!--我的借还记录列表-->
<template>
<div class="container1">
<!-- header-->
<cs-site-select-header @change-select="changeSelect" @search-fun="searchFun"
:selectDefaultValue="searchCondition.data.state"
:option="init.key.array"></cs-site-select-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-borrowing-and-returning-list-card :item="item">
<template v-slot:image>
<img :src="getImage(`${ ['kejie','jiechu','guihuan'][item.state]}`)">
</template>
<template v-slot:default>
<div class="w-full h-full flex justify-end items-center ">
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</div>
</template>
</cs-borrowing-and-returning-list-card>
</div>
</div>
<!-- footer-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import {getImage} from "../../hooks/index.js";
import router from "../../router/index.js";
import * as hooks from "../../hooks/index.js";
import * as api from "../../util/request/dist/controller/index.js";
import {onMounted, reactive} from "vue";
const detail = (e) => {
router.push({
name: 'loanAndReturnDetail',
query: {
id: e
}
})
}
const init = reactive({
keyQrcode: {
show: false,
},
placeType: {
array: []
},
data: {
array: []
},
key: {
array: [
{text: '借出', value: 1},
{text: '归还', value: 2},
]
}
})
function getPlaceType() {
//获取场地类型
hooks.getInitListRequest(() => {
api.getApiCommonGetPlaceTypeSelect().then(res => {
let array = []
res.response.map(cur => {
array.push({text: cur.name, value: cur.id})
})
init.placeType.array = array
})
})
}
const searchCondition = reactive({
//场地初始化
data: {
"key_code_name": "",
"card_name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.card_name = e
getData()
}
function changeSelect(e) {
//下拉框
searchCondition.data.state = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.getInitListRequest(() => {
api.postApiKeyGetKeyTrackListMySelf(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
})
})
}
onMounted(() => {
document.title = "我的钥匙借还记录"
getData()
getPlaceType()
})
</script>
<style scoped>
</style>
<script setup>
</script>
<template>
</template>
<style scoped>
</style>
<template>
<van-nav-bar
title="值班信息"
left-text="返回"
left-arrow
@click-left="onClickLeft"
/>
<div class="container">
<!-- v-for="(dutyObject.data,index) in dutyObject.data" :key="index"-->
<van-cell-group class="cardContainer" inset>
<van-cell class="cardContent" :title="dutyObject.data.username">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.card_name }}</span></van-tag>
<van-tag color="#7232dd" type="primary" plain style="margin-left: 10px">{{
['值班教师', '值班领导'][dutyObject.data.is_lead]
}}
</van-tag>
<!-- <van-tag :color="['','#7232dd'][dutyObject.data.is_lead]" type="primary" plain style="margin-left: 10px">-->
<!-- <span>{{ ['值班教师', '值班领导'][dutyObject.data.is_lead] }}</span></van-tag>-->
</template>
</van-cell>
<van-cell class="cardContent" title="手机号">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.mobile }}</span></van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="日期">
<template #extra>
<van-tag type="primary" plain><span>{{ dutyObject.data.watch_date }}</span></van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="时段">
<template #extra>
<van-tag type="primary" plain style="margin-left: 10px"><span>{{ dutyObject.data.watch_hour_time }}</span>
</van-tag>
</template>
</van-cell>
<van-cell class="cardContent" title="类型">
<template #extra>
<van-tag type="primary" plain>
<span>{{
dutyObject.data.watchtypename + '-' + dutyObject.data.dept_name + '-' + dutyObject.data.campusname
}}</span>
</van-tag>
</template>
</van-cell>
</van-cell-group>
</div>
</template>
<script setup>
import dayjs from 'dayjs';
import * as api from '../../api/index.js';
import {ref, reactive, onMounted, watch} from 'vue';
import {useRouter} from "vue-router";
import {showToast} from "vant";
const router = useRouter()
let dutyObject = reactive({
data: {}
})
const getDutyMessage = async () => {
let data = {
id: router.currentRoute.value.query.id
}
const res = await api.GetWatchInfo(data)
dutyObject.data = res.response
}
onMounted(() => {
getDutyMessage()
})
const onClickLeft = () => router.push({
name: 'signList'
});
</script>
<style>
.container {
.cardContainer {
margin-top: 10px;
width: 95%;
background-color: #ffffff;
height: 20%;
.cardContent {
//height: 150px;
}
}
}
</style>
此差异已折叠。
<template>
<div class="w-screen h-screen bg-gray-100 box-border">
<!-- header h-54px-->
<cs-header :path="'myActivity'" @search-fun="searchFun"></cs-header>
<!-- content-->
<div class="w-full h-[calc(100vh-109px)] p-3 overflow-y-auto">
<div v-for="(item,index) in init.data.array" :key="index">
<cs-card :item="item">
<template v-slot:image>
<img :src="spzlogo">
</template>
<template v-slot:default>
<van-button :disabled="hooks.getUserInfo().card_number !== item.card" class="w-[48%]" plain size="small"
type="primary" @click="cancel(item.id)">取消
</van-button>
<van-button @click="detail(item.id)" class="w-[48%] text-gray-600" plain size="small">详情</van-button>
</template>
</cs-card>
</div>
</div>
<!-- footer h-55px-->
<cs-page :total="searchCondition.data.total" @pageChange="pageChange"></cs-page>
</div>
</template>
<script setup>
import spzlogo from '../../../states/icon/ing.png'
import {ref, defineAsyncComponent, getCurrentInstance, reactive, onMounted, inject} from 'vue'
import router from "../../../router/index.js";
import * as api from '../../../../src/util/request/dist/controller/index.js'
import * as hooks from "../../../hooks/index.js";
const asc = getCurrentInstance().appContext.config.globalProperties
let search = ref('')
function back() {
router.push({
name: 'welcome'
})
}
const init = reactive({
data: {
array: []
}
})
const detail = (e) => {
router.push({
name: 'indexDetail',
query: {
id: e
}
})
}
function cancel(id) {
//取消活动
hooks.publicConfirm(() => {
hooks.myEncapsulationFunction(async () => {
const res = await api.getApiActivityActivityCancel({id: id})
if (res.code === 1) getData()
return res
})
})
}
const searchCondition = reactive({
data: {
"name": "",
"state": 1,
"page_index": 1,
"page_size": 10,
'total': 0,
}
})
function searchFun(e) {
//搜索框事件回调 点击icon 提供searchValue
searchCondition.data.name = e
getData()
}
function pageChange(e) {
//分页 通过组件获取当前页
searchCondition.data.page_index = e
getData()
}
function getData() {
//初始化方法查询
hooks.myEncapsulationFunction(() => {
return api.postApiActivityGetActivityListByWxUser(searchCondition.data).then(res => {
init.data.array = res.response.data
searchCondition.data.total = res.response.data_count
return res
})
}, true, '加载中...')
}
onMounted(() => {
getData()
document.title = '审批中'
})
</script>
<style scoped>
</style>
此差异已折叠。
此差异已折叠。
<!--活动数据-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<div class="w-full h-auto bg-white box-border mt-3">
<div class="w-full h-[50px] flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>申请人名称</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">周老师</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>申请人卡号</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">132132132</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>联系方式</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">17000000000</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>班级</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">2023级电子班</span>
</div>
</div>
<div class="w-full h-1/5 flex p-3 ">
<div class="w-[30%] h-full flex items-center">
<span>学院</span>
</div>
<div class="w-[70%] h-full flex items-center ">
<span class="ml-1">物理与电子信息工程系</span>
</div>
</div>
</div>
<dt-card :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
<dt-card :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
<dt-card :nmb="true" :array="[
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
{label:'申请人名称',value:'周老师'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--评价-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'评论人',value:'周老师'},
{label:'星级',level:5},
{label:'评论',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'活动照片',image:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--评价-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'钥匙名称',value:'一号楼钥匙'},
{label:'钥匙编号',value:5123},
{label:'地址',value:'2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版2023级电子版'},
{label:'可借状态',tag:'可接'},
{label:'钥匙照片',image:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
<!--参与人-->
<template>
<div class="
w-full
min-h-[calc(100%-54px)]
overflow-y-auto
flex content-start
flex-wrap
bg-gray-200
">
<div class="w-full h-[55px] flex items-center justify-center">
<div class="
w-[92%] h-[70%]
bg-white border
border-[#6BB5EA]
border-dashed
flex justify-center items-center
active:bg-blue-50
active:text-[50px]
rounded-[2px]
">
<div class="text-[10px] mx-1 text-blue-400">
<van-icon name="plus"></van-icon>
</div>
<span class="text-[16px] text-[#6BB5EA]">新增参与人</span>
</div>
</div>
<dt-card :nmt="true" :array="[
{label:'参与人姓名',value:'周老师'},
{label:'参与人卡号',value:'2023级电子版'},
{label:'性别',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'学院',value:'计算机系'},
]"></dt-card>
<dt-card :array="[
{label:'参与人姓名',value:'周老师'},
{label:'参与人卡号',value:'asc202312128'},
{label:'性别',value:'男'},
{label:'班级',value:'2023级电子版'},
{label:'学院',value:'计算机系'},
]"></dt-card>
</div>
</template>
<script setup>
</script>
<style scoped>
</style>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
export const flow = [
{
//外接流程表单页
name: 'flowFormIndex',
path: '/flowFormIndex',
component: () => import('../pages/flow/flowFormIndex.vue'),
},
{
//外接流程场地类型选择框
name: 'selectPlaceType',
path: '/selectPlaceType',
component: () => import('../components/flow/selectPlaceType.vue'),
},
{
//外接流程场地选择框
name: 'selectPlace',
path: '/selectPlace',
component: () => import('../components/flow/selectPlace.vue'),
},
]
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或