Merge branch 'master' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue
This commit is contained in:
commit
4a9d6fffea
233
src/views/statistics/RouteView.vue
Normal file
233
src/views/statistics/RouteView.vue
Normal file
|
@ -0,0 +1,233 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<a-layout id="components-layout-demo-custom-trigger" style="height: 100%">
|
||||||
|
<a-layout-sider theme="light" v-model="collapsed" :trigger="null" collapsible width="292px">
|
||||||
|
<div>
|
||||||
|
<a-menu
|
||||||
|
id="dddddd"
|
||||||
|
:default-selected-keys="['1']"
|
||||||
|
:default-open-keys="['2']"
|
||||||
|
mode="inline"
|
||||||
|
:inline-collapsed="collapsed"
|
||||||
|
@openChange="onOpenChange"
|
||||||
|
@click="menuClick"
|
||||||
|
>
|
||||||
|
<!-- 菜单遍历的开始 -->
|
||||||
|
<template v-for="(item, index) in menus">
|
||||||
|
<!-- 如果当前遍历项没有children,视为子菜单项,注意所有的key都是path用于路由跳转,以及当前选中记录 -->
|
||||||
|
<a-menu-item v-if="!item.children" :key="item.path">
|
||||||
|
<span>{{ item.meta.title }}</span>
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="line-base"></div>
|
||||||
|
</a-menu-item>
|
||||||
|
<!-- 否则视为子菜单,传入菜单信息并且运用下面定义的函数式组件 -->
|
||||||
|
<sub-menu v-else :key="item.path" :menu-info="item" :menu-index="index" />
|
||||||
|
</template>
|
||||||
|
</a-menu>
|
||||||
|
</div>
|
||||||
|
</a-layout-sider>
|
||||||
|
<a-layout style="background-color: aliceblue">
|
||||||
|
<keep-alive>
|
||||||
|
<router-view v-if="keepAlive" />
|
||||||
|
</keep-alive>
|
||||||
|
<router-view v-if="!keepAlive" />
|
||||||
|
</a-layout>
|
||||||
|
</a-layout>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { Menu } from 'ant-design-vue'
|
||||||
|
const SubMenu = {
|
||||||
|
template: `
|
||||||
|
<a-sub-menu :key="menuInfo.path" :id="menuIndex" v-bind="$props" v-on="$listeners">
|
||||||
|
<span slot="title" >
|
||||||
|
<span>{{ menuInfo.meta.title }}</span>
|
||||||
|
<div class="line"></div>
|
||||||
|
<div class="line-right"></div>
|
||||||
|
<img src="@/assets/images/global/delete.png" alt="" />
|
||||||
|
</span>
|
||||||
|
<template v-for="item in menuInfo.children">
|
||||||
|
<a-menu-item v-if="!item.children" :key="item.path" class="sub-menu-children">
|
||||||
|
<i :class="item.icon" />
|
||||||
|
<span>{{ item.meta.title }}</span>
|
||||||
|
</a-menu-item>
|
||||||
|
<sub-menu v-else :key="item.path" :menu-info="item" />
|
||||||
|
</template>
|
||||||
|
</a-sub-menu>
|
||||||
|
`,
|
||||||
|
name: 'SubMenu',
|
||||||
|
// must add isSubMenu: true 此项必须被定义
|
||||||
|
isSubMenu: true,
|
||||||
|
props: {
|
||||||
|
// 解构a-sub-menu的属性,也就是文章开头提到的为什么使用函数式组件
|
||||||
|
...Menu.SubMenu.props,
|
||||||
|
// 接收父级传递过来的菜单信息
|
||||||
|
menuInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
menuIndex: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'menuTree',
|
||||||
|
components: { 'sub-menu': SubMenu },
|
||||||
|
computed: {
|
||||||
|
keepAlive() {
|
||||||
|
return this.$route.meta.keepAlive
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const collapsed = false
|
||||||
|
return {
|
||||||
|
collapsed,
|
||||||
|
selectedKeys: '',
|
||||||
|
openKeys: '',
|
||||||
|
handleClick: '',
|
||||||
|
titleClick: '',
|
||||||
|
menu: [],
|
||||||
|
// 展开的父菜单项
|
||||||
|
openKeys: [],
|
||||||
|
// 选中的子菜单项
|
||||||
|
defaultSelectedKeys: [this.$route.path],
|
||||||
|
rootSubmenuKeys: ['/istatistics/imsData', '/istatistics'],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.info(this.$store.getters.permissionList)
|
||||||
|
var permissionList = this.$store.getters.permissionList
|
||||||
|
permissionList.forEach((f) => {
|
||||||
|
if (f.name === 'istatistics') {
|
||||||
|
this.menus = f.children
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.info(this.menus)
|
||||||
|
// 将从缓存中取出openKeys
|
||||||
|
const openKeys = window.sessionStorage.getItem('openKeys')
|
||||||
|
if (openKeys) {
|
||||||
|
// 存在即赋值
|
||||||
|
this.openKeys = JSON.parse(openKeys)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 点击菜单,路由跳转,注意的是当点击MenuItem才会触发此函数
|
||||||
|
menuClick({ item, key, keyPath }) {
|
||||||
|
// 获取到当前的key,并且跳转
|
||||||
|
this.$router.push({
|
||||||
|
path: key,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onOpenChange(openKeys) {
|
||||||
|
// 将当前打开的父级菜单存入缓存中
|
||||||
|
window.sessionStorage.setItem('openKeys', JSON.stringify(openKeys))
|
||||||
|
// 控制只打开一个
|
||||||
|
const latestOpenKey = openKeys.find((key) => this.openKeys.indexOf(key) === -1)
|
||||||
|
if (this.rootSubmenuKeys.indexOf(latestOpenKey) === -1) {
|
||||||
|
this.openKeys = openKeys
|
||||||
|
} else {
|
||||||
|
this.openKeys = latestOpenKey ? [latestOpenKey] : []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.ant-layout {
|
||||||
|
height: 100%;
|
||||||
|
.ant-layout-sider-light {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-menu {
|
||||||
|
width: 292px;
|
||||||
|
height: 939px;
|
||||||
|
background-color: #022024;
|
||||||
|
border: solid 1px #0c6a66;
|
||||||
|
opacity: 0.9;
|
||||||
|
|
||||||
|
font-family: MicrogrammaD-MediExte;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-stretch: normal;
|
||||||
|
line-height: 16px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
color: #ffffff;
|
||||||
|
|
||||||
|
::v-deep {
|
||||||
|
.ant-menu-inline.ant-menu-sub {
|
||||||
|
color: #60b3a6;
|
||||||
|
background-color: #032d31 !important;
|
||||||
|
}
|
||||||
|
.ant-menu-submenu-selected {
|
||||||
|
color: #ade6ee;
|
||||||
|
}
|
||||||
|
.ant-menu-submenu > .ant-menu-submenu-title,
|
||||||
|
.ant-menu-item {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
.ant-menu-sub.ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.sub-menu-children {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.ant-menu-inline .ant-menu-item::after {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-menu-submenu-open {
|
||||||
|
font-family: MicrogrammaD-MediExte;
|
||||||
|
font-weight: bold;
|
||||||
|
font-stretch: normal;
|
||||||
|
line-height: 43px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
color: #ade6ee;
|
||||||
|
}
|
||||||
|
.line {
|
||||||
|
width: 70px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #0cebc9;
|
||||||
|
margin-top: 10px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .ant-menu-inline > .ant-menu-submenu[menuindex] > .ant-menu-submenu-title {
|
||||||
|
border-bottom: 1px solid #0cecca66;
|
||||||
|
color: #ffffff !important;
|
||||||
|
height: 50px;
|
||||||
|
.line {
|
||||||
|
width: 92%;
|
||||||
|
height: 5px;
|
||||||
|
// background-color: #0cebc9;
|
||||||
|
background-image: linear-gradient(
|
||||||
|
to right,
|
||||||
|
#0cebc9 70px,
|
||||||
|
transparent 10px,
|
||||||
|
transparent calc(100% - 10px),
|
||||||
|
transparent calc(100% - 10px)
|
||||||
|
);
|
||||||
|
margin-top: 10px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -1px;
|
||||||
|
}
|
||||||
|
.line:after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
width: 10px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 0;
|
||||||
|
background-color: #0cebc9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
||||||
|
background-color: #075259 !important;
|
||||||
|
color: #0cecca;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
171
src/views/statistics/blankphd.vue
Normal file
171
src/views/statistics/blankphd.vue
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false" style="margin-left: 20px">
|
||||||
|
<search-form :items="formItems" v-model="queryParam" @search="searchQuery">
|
||||||
|
<a-space style="float: right" class="btn-group" slot="additional">
|
||||||
|
<a-button @click="handleEdit" type="primary">
|
||||||
|
<img src="@/assets/images/global/edit.png" alt="" />
|
||||||
|
Excel
|
||||||
|
</a-button>
|
||||||
|
</a-space>
|
||||||
|
</search-form>
|
||||||
|
<custom-table
|
||||||
|
size="middle"
|
||||||
|
rowKey="sampleId"
|
||||||
|
:columns="columns"
|
||||||
|
:list="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
@change="handleTableChange"
|
||||||
|
:selectedRowKeys.sync="selectedRowKeys"
|
||||||
|
:scroll="{ x: true, y: 'calc(100vh - 410px)' }"
|
||||||
|
>
|
||||||
|
<template slot="index" slot-scope="{ index }">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</template>
|
||||||
|
</custom-table>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'NO',
|
||||||
|
align: 'left',
|
||||||
|
width: 50,
|
||||||
|
scopedSlots: {
|
||||||
|
customRender: 'index',
|
||||||
|
},
|
||||||
|
customHeaderCell: () => {
|
||||||
|
return {
|
||||||
|
style: {
|
||||||
|
'padding-left': '26px !important',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customCell: () => {
|
||||||
|
return {
|
||||||
|
style: {
|
||||||
|
'padding-left': '26px !important',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'STATION',
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'siteDetCode',
|
||||||
|
width: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'DETECTOR CODE',
|
||||||
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'sampleId',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'SPECTRAL QUALIFIER',
|
||||||
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'stationName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'ACQUISITION START TIME',
|
||||||
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'detectorsName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'ACQUISITION STOP TIME',
|
||||||
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
|
dataIndex: 'sampleType',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
|
export default {
|
||||||
|
name: 'menuTree',
|
||||||
|
mixins: [JeecgListMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
columns,
|
||||||
|
url: {
|
||||||
|
list: '/gardsSampleData/findPage',
|
||||||
|
delete: '/gardsSampleData/deleteById',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
handleTableChange() {},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formItems() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
type: 'a-input',
|
||||||
|
label: '',
|
||||||
|
name: 'username',
|
||||||
|
props: {
|
||||||
|
style: {
|
||||||
|
width: '166px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'custom-select',
|
||||||
|
label: 'Stations',
|
||||||
|
name: 'roleId',
|
||||||
|
props: {
|
||||||
|
options: this.roleOptions,
|
||||||
|
style: {
|
||||||
|
width: '200px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Start date',
|
||||||
|
type: 'custom-date-picker',
|
||||||
|
name: 'collectStart',
|
||||||
|
props: {
|
||||||
|
showTime: { format: 'HH:mm' },
|
||||||
|
format: 'YYYY-MM-DD HH:mm',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
style: {
|
||||||
|
minWidth: 'auto',
|
||||||
|
width: '200px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'End date',
|
||||||
|
type: 'custom-date-picker',
|
||||||
|
name: 'collectStop',
|
||||||
|
props: {
|
||||||
|
showTime: { format: 'HH:mm' },
|
||||||
|
format: 'YYYY-MM-DD HH:mm',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
style: {
|
||||||
|
minWidth: 'auto',
|
||||||
|
width: '200px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
</style>
|
||||||
|
|
16
src/views/statistics/calibphd.vue
Normal file
16
src/views/statistics/calibphd.vue
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<template>
|
||||||
|
<!-- <a-card :bordered="false">
|
||||||
|
<my-menu />
|
||||||
|
<div>111</div>
|
||||||
|
</a-card> -->
|
||||||
|
<div>
|
||||||
|
12311111
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
setup() {},
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user