Browse Source

基本信息布局

master
maochaoying 2 years ago
parent
commit
e92378ba01
  1. 15
      src/api/info.js
  2. 153
      src/components/Nuclear.vue
  3. 1
      src/components/Publish.vue
  4. 12
      src/pages/index.vue

15
src/api/info.js

@ -0,0 +1,15 @@
import request from '@/service'
export const stationListApi = () => {
return request({
url: '/station/list',
method: 'GET',
})
}
export const coreListApi = () => {
return request({
url: '/core/list',
method: 'GET',
})
}

153
src/components/Nuclear.vue

@ -0,0 +1,153 @@
<template>
<div class="nuclear_container">
<t-tabs :value="tabValue" @change="newValue => (tabValue = newValue)">
<t-tab-panel value="first" label="核电站信息管理">
<div style="padding: 25px">
<t-button
style="margin-bottom: 25px"
theme="primary"
@click="stationVisible = true"
>新增核电站</t-button
>
<t-dialog
header="新增核电站"
:visible="stationVisible"
:footer="false"
:onClose="stationClose"
>
<template v-slot:body>
<div>这是使用插槽定义的对话框内容</div>
</template>
</t-dialog>
<t-table
bordered
hover
stripe
resizable
tableLayout="auto"
row-key="id"
:data="stationList"
:columns="stationColumns"
/>
</div>
</t-tab-panel>
<t-tab-panel value="second" label="核芯堆信息管理">
<div style="padding: 25px">
<t-button
theme="primary"
style="margin-bottom: 25px"
@click="coreVisible = true"
>新增核芯堆</t-button
>
<t-dialog
header="新增核芯堆"
:visible="coreVisible"
:footer="false"
:onClose="coreClose"
>
<template v-slot:body>
<div>这是使用插槽定义的对话框内容</div>
</template>
</t-dialog>
<t-table
bordered
hover
stripe
resizable
tableLayout="auto"
row-key="id"
:data="coreList"
:columns="coreColumns"
/>
</div>
</t-tab-panel>
</t-tabs>
</div>
</template>
<script lang="jsx">
import { stationListApi, coreListApi } from '@/api/info'
export default {
data() {
return {
tabValue: 'first',
stationVisible: false,
coreVisible: false,
stationColumns: [
{
colKey: 'name',
title: '名称',
},
{
colKey: 'address',
title: '地址',
},
{
title: '操作',
cell: (h, { row }) => (
<div>
<t-button theme="danger" onClick={() => this.delStation(row.id)}>
删除
</t-button>
</div>
),
},
],
stationList: [],
coreList: [],
coreColumns: [
{
colKey: 'name',
title: '名称',
},
{
colKey: 'serialNumber',
title: '序列号',
},
{
title: '操作',
cell: (h, { row }) => (
<div>
<t-button theme="danger" onClick={() => this.delCore(row.id)}>
删除
</t-button>
</div>
),
},
],
}
},
methods: {
delStation(id) {},
delCore(id) {},
stationClose() {
this.stationVisible = false
},
coreClose() {
this.coreVisible = false
},
async getStationList() {
const res = await stationListApi()
if (res?.code == 200) {
this.stationList = res?.data?.list
}
},
async getCoreList() {
const res = await coreListApi()
if (res?.code == 200) {
this.coreList = res?.data?.list
}
},
},
mounted() {
this.getStationList()
this.getCoreList()
},
}
</script>
<style lang="scss" scoped>
.nuclear_container {
}
</style>

1
src/components/Publish.vue

@ -1,5 +1,4 @@
<template> <template>
<!-- scrollToFirstError="smooth" -->
<t-form <t-form
:data="formData" :data="formData"
:rules="rules" :rules="rules"

12
src/pages/index.vue

@ -133,14 +133,13 @@
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none" fill="none"
version="1.1" version="1.1"
width="26.271926879882812"
height="21.392486572265625"
viewBox="0 0 26.271926879882812 21.392486572265625"
width="30"
height="21.657630920410156"
viewBox="0 0 30 21.657630920410156"
> >
<g> <g>
<path <path
d="M19.2738,3.31288L23.8579,3.31288C25.1907,3.31288,26.2719,4.39406,26.2719,5.72692L26.2719,18.9784C26.2719,20.3113,25.1907,21.3925,23.8579,21.3925L2.41404,21.3925C1.08118,21.3925,0,20.3113,0,18.9784L0,5.72692C0,4.39406,1.08118,3.31288,2.41404,3.31288L6.99814,3.31288C7.2113,3.31288,7.38336,3.14082,7.38336,2.92766L7.38336,2.41404C7.38336,1.08118,8.46454,0,9.7974,0L16.4745,0C17.8074,0,18.8886,1.08118,18.8886,2.41404L18.8886,2.92766C18.8886,3.14082,19.0606,3.31288,19.2738,3.31288ZM23.8579,19.8516C24.3407,19.8516,24.7311,19.4613,24.7311,18.9784L24.7311,5.72692C24.7311,5.24411,24.3407,4.85376,23.8579,4.85376L18.1181,4.85376C17.6918,4.85376,17.3477,4.50963,17.3477,4.08332L17.3477,2.41404C17.3477,1.93123,16.9573,1.54088,16.4745,1.54088L9.7974,1.54088C9.31459,1.54088,8.92424,1.93123,8.92424,2.41404L8.92424,4.08332C8.92424,4.50963,8.58011,4.85376,8.1538,4.85376L2.41404,4.85376C1.93123,4.85376,1.54087,5.24411,1.54087,5.72692L1.54087,18.9784C1.54087,19.4613,1.93123,19.8516,2.41404,19.8516L23.8579,19.8516ZM21.3538,9.11679C22.2615,9.11679,22.9974,8.38093,22.9974,7.47319C22.9974,6.56545,22.2615,5.82959,21.3538,5.82959C20.4461,5.82959,19.7102,6.56545,19.7102,7.47319C19.7102,8.38093,20.4461,9.11679,21.3538,9.11679ZM9.09363,8.27185C10.1799,7.18553,11.6258,6.58716,13.1615,6.58716C14.6973,6.58716,16.1431,7.18553,17.2295,8.27185C18.3158,9.35817,18.9141,10.804,18.9141,12.3398C18.9141,13.8755,18.3158,15.3214,17.2295,16.4077C16.1431,17.494,14.6973,18.0924,13.1615,18.0924C11.6258,18.0924,10.1799,17.494,9.09363,16.4077C8.00731,15.3214,7.40894,13.8755,7.40894,12.3398C7.40894,10.804,8.00731,9.35817,9.09363,8.27185ZM8.94981,12.3398C8.94981,14.6613,10.84,16.5515,13.1615,16.5515C15.4831,16.5515,17.3733,14.6613,17.3733,12.3398C17.3733,10.0182,15.4831,8.12803,13.1615,8.12803C10.84,8.12803,8.94981,10.0182,8.94981,12.3398Z"
fill-rule="evenodd"
d="M29.1848,20.0272L26.9564,20.0272L26.9564,17.9348C26.9564,17.9315,26.9553,17.9281,26.9553,17.9248C26.9547,17.8779,26.95,17.8309,26.9413,17.784C26.9393,17.7739,26.9369,17.7639,26.9349,17.7538C26.9322,17.7414,26.9302,17.729,26.9269,17.717L23.8118,6.47316L23.8118,3.30077C23.8118,2.85059,23.4468,2.48555,22.9966,2.48555L17.4825,2.48555C17.0323,2.48555,16.6673,2.85059,16.6673,3.30077L16.6673,6.47316L16.3787,7.51464L15.5729,4.88261L15.5729,0.81522C15.5729,0.36504,15.2078,0,14.7576,0L7.81727,0C7.36709,0,7.00206,0.36504,7.00206,0.81522L7.00206,4.88294L3.07917,17.6962C3.07348,17.7153,3.06945,17.7344,3.0651,17.7538C3.06308,17.7622,3.06074,17.7703,3.05906,17.7786C3.04968,17.8259,3.04565,17.8735,3.04465,17.9208C3.04465,17.9255,3.04331,17.9301,3.04331,17.9348L3.04331,20.0272L0.815214,20.0272C0.365036,20.0272,0,20.3922,0,20.8424C0,21.2926,0.365036,21.6576,0.815214,21.6576L29.1848,21.6576C29.635,21.6576,30,21.2926,30,20.8424C30,20.3922,29.635,20.0272,29.1848,20.0272ZM8.59662,5.24362C8.62041,5.16619,8.63248,5.08574,8.63248,5.00496L8.63248,1.63044L13.9428,1.63044L13.9428,5.00495C13.9428,5.08574,13.9548,5.16619,13.9786,5.24362L17.6143,17.1196L4.96067,17.1196L8.59662,5.24362ZM17.9012,20.0272L4.67407,20.0272L4.67407,18.7501L17.9012,18.7501L17.9012,20.0272ZM17.267,10.4162L18.2682,6.80233C18.288,6.7316,18.2977,6.65819,18.2977,6.58478L18.2977,4.11666L22.1814,4.11666L22.1814,5.95158L20.252,5.95158C19.9818,5.95158,19.7629,6.17047,19.7629,6.44064C19.7629,6.71082,19.9818,6.92971,20.252,6.92971L22.2461,6.92971L25.0692,17.12L19.3191,17.12L17.267,10.4162ZM25.3259,20.0272L19.5316,20.0272L19.5316,18.7501L25.3263,18.7501L25.3263,20.0272L25.3259,20.0272ZM10.4751,11.817C10.5488,11.6893,10.6491,11.5867,10.7644,11.5116L9.94045,10.0847C9.5708,10.307,9.26393,10.6199,9.04881,10.9937C8.82522,11.3812,8.71494,11.8026,8.70723,12.2206L10.3551,12.2206C10.3625,12.0828,10.4014,11.9447,10.4751,11.817ZM10.8495,13.077L10.0259,14.5033C10.8193,14.9415,11.7485,14.9136,12.4917,14.5043L11.6677,13.077C11.4184,13.2034,11.1147,13.2118,10.8495,13.077ZM12.5768,10.0853L11.7536,11.5116C12.0026,11.6739,12.1474,11.941,12.1628,12.2206L13.8107,12.2206C13.7933,11.3722,13.3531,10.5533,12.5768,10.0853ZM10.93,12.8394C11.2444,13.0211,11.6466,12.9131,11.8283,12.5987C12.01,12.2843,11.9021,11.882,11.5876,11.7003C11.2732,11.5187,10.871,11.6266,10.6893,11.941C10.5076,12.2555,10.6155,12.6577,10.93,12.8394ZM13.0887,9.1005C12.2423,8.6121,11.2561,8.48238,10.3119,8.73479C9.36758,8.98787,8.57852,9.59325,8.08979,10.44C7.08083,12.1874,7.68185,14.4299,9.42926,15.4389C9.99307,15.7644,10.6189,15.9306,11.2531,15.9306C11.5709,15.9306,11.891,15.8887,12.2061,15.8043C13.1504,15.5512,13.9394,14.9458,14.4281,14.0994C15.4368,12.352,14.8361,10.1095,13.0887,9.1005ZM13.8633,13.7736C13.4618,14.4691,12.8131,14.9669,12.0371,15.1748C11.2615,15.3822,10.451,15.276,9.75508,14.8741C9.05953,14.4725,8.56176,13.8239,8.35393,13.0482C8.1461,12.2725,8.2527,11.462,8.65427,10.7665C9.05585,10.0709,9.70446,9.57314,10.4805,9.36531C10.7396,9.29592,11.0024,9.26139,11.2635,9.26139C11.7844,9.26139,12.2989,9.39816,12.7622,9.66565C14.1985,10.4946,14.6923,12.3372,13.8633,13.7736Z"
fill="#FFFFFF" fill="#FFFFFF"
fill-opacity="1" fill-opacity="1"
/> />
@ -200,7 +199,7 @@
<Debug /> <Debug />
</div> </div>
<div class="task_container" v-if="activePage == 5 && role == 'ROLE_ADMIN'"> <div class="task_container" v-if="activePage == 5 && role == 'ROLE_ADMIN'">
核电站信息和反应堆信息维护
<Nuclear />
</div> </div>
</div> </div>
</template> </template>
@ -210,6 +209,7 @@ import { useAccountStore } from '@/store'
import Cookie from '@/utils/cookie' import Cookie from '@/utils/cookie'
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import Excel from 'cpns/Excel' import Excel from 'cpns/Excel'
import Nuclear from 'cpns/Nuclear'
import Image from 'cpns/Image' import Image from 'cpns/Image'
import Task from 'cpns/Task' import Task from 'cpns/Task'
import Publish from 'cpns/Publish' import Publish from 'cpns/Publish'

Loading…
Cancel
Save