23 changed files with 521 additions and 22 deletions
-
5src/src/main/java/com/my/graphiteDigesterBg/diframe/DiActiveRecord.java
-
4src/src/main/java/com/my/graphiteDigesterBg/diframe/api/DiApiUser.java
-
16src/src/main/java/com/my/graphiteDigesterBg/diframe/configuration/WebConfig.java
-
15src/src/main/java/com/my/graphiteDigesterBg/diframe/model/DiMdbRole.java
-
5src/src/main/java/com/my/graphiteDigesterBg/diframe/model/DiMdbUser.java
-
73src/web/package-lock.json
-
5src/web/package.json
-
8src/web/src/App.vue
-
1src/web/src/assets/icon/logo.svg
-
1src/web/src/assets/icon/logout.svg
-
BINsrc/web/src/assets/img/login-pic.png
-
10src/web/src/main.js
-
64src/web/src/pages/login/Page.vue
-
69src/web/src/pages/main/Page.vue
-
43src/web/src/pages/main/contents/AcidManagement.vue
-
29src/web/src/pages/main/contents/History.vue
-
2src/web/src/pages/main/contents/Operation.vue
-
21src/web/src/pages/main/contents/TaskStepManagement.vue
-
33src/web/src/pages/main/contents/Test.vue
-
74src/web/src/pages/main/contents/UserManagement.vue
-
16src/web/src/stores/AppStore.js
-
38src/web/src/utils/ApiClient.js
-
7src/web/vue.config.js
@ -1,2 +1,16 @@ |
|||||
package com.my.graphiteDigesterBg.diframe.configuration;public class WebConfig { |
|
||||
|
package com.my.graphiteDigesterBg.diframe.configuration; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry; |
||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
||||
|
@Configuration |
||||
|
public class WebConfig implements WebMvcConfigurer { |
||||
|
@Override |
||||
|
public void addCorsMappings(CorsRegistry registry) { |
||||
|
registry.addMapping("/**") |
||||
|
.allowCredentials(true) |
||||
|
.allowedOriginPatterns("*") |
||||
|
.allowedMethods("GET", "POST", "PUT", "DELETE") |
||||
|
.allowedHeaders("*") |
||||
|
.exposedHeaders("*"); |
||||
|
} |
||||
} |
} |
@ -1,2 +1,15 @@ |
|||||
package com.my.graphiteDigesterBg.diframe.model;public class DiMdbRole { |
|
||||
|
package com.my.graphiteDigesterBg.diframe.model; |
||||
|
import com.my.graphiteDigesterBg.diframe.DiActiveRecord; |
||||
|
public class DiMdbRole extends DiActiveRecord { |
||||
|
// id |
||||
|
public Integer id; |
||||
|
// name |
||||
|
public String name; |
||||
|
// permissions |
||||
|
public String permissions; |
||||
|
|
||||
|
// get table name |
||||
|
public static String getTableName() { |
||||
|
return "app_roles"; |
||||
|
} |
||||
} |
} |
@ -1,6 +1,12 @@ |
|||||
<template> |
<template> |
||||
<page-main /> |
|
||||
|
<page-login v-if="null === appStore.accessToken" /> |
||||
|
<page-main v-else /> |
||||
|
|
||||
</template> |
</template> |
||||
<script setup> |
<script setup> |
||||
import PageMain from './pages/main/Page.vue' |
import PageMain from './pages/main/Page.vue' |
||||
|
import PageLogin from './pages/login/Page.vue' |
||||
|
import { useAppStore } from '@/stores/AppStore'; |
||||
|
/** @var {AppStore} */ |
||||
|
const appStore = useAppStore(); |
||||
</script> |
</script> |
@ -0,0 +1 @@ |
|||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="100" height="100" viewBox="0 0 100 100"><g><g><path d="M99.99997243041992,50.748648477783206C99.99997243041992,55.204608477783204,96.38627243041992,58.8169084777832,91.92857243041992,58.8169084777832C87.47047243041992,58.8169084777832,40.42767243041992,53.088008477783205,21.136272430419922,50.748648477783206C42.82147243041992,48.0742484777832,87.47047243041992,42.6804084777832,91.92857243041992,42.6804084777832C96.38627243041992,42.680417068953204,99.99997243041992,46.2926884777832,99.99997243041992,50.748648477783206Z" fill="#FAC03D" fill-opacity="1"/></g><g><path d="M89.9514084411621,78.40465869384765C89.9592084411621,80.82313869384765,88.00010844116211,82.78785869384765,85.58060844116211,82.78785869384765C83.1671084411621,82.78785869384765,57.69960844116211,79.69117869384766,47.25130844116211,78.41872869384765C58.99230844116211,76.96891869384766,83.1671084411621,74.04959869384766,85.58060844116211,74.04959869384766C87.9891084411621,74.04958151144766,89.9437084411621,75.99714869384766,89.9514084411621,78.40465869384765Z" fill="#FAC03D" fill-opacity="1"/></g><g><path d="M96.69639218139648,66.31107654296875C96.69799218139649,69.78085654296875,93.88449218139648,72.59445654296874,90.41339218139649,72.59445654296874C86.94369218139649,72.59445654296874,51.622192181396485,68.13248654296875,36.605892181396484,66.31106654296875C53.48659218139649,64.23066654296875,86.94369218139649,60.03045654296875,90.41339218139649,60.03045654296875C93.88339218139649,60.03045654296875,96.69639218139648,62.84238654296875,96.69639218139648,66.31107654296875Z" fill="#FAC03D" fill-opacity="1"/></g><g><path d="M50.0676,0.00000859117C14.8134,-0.00580763,-9.38025,35.4747,3.51251,68.2739C16.4053,101.073,58.2903,110.6,84.1106,86.6055C80.4635,86.2705,72.3921,85.288,58.3728,83.5454L56.4408,83.3089C38.0246,92.955,15.2725,85.8429,5.63499,67.4273C-4.00248,49.0118,3.12783,26.2734,21.5571,16.6522C39.9864,7.03092,62.7288,14.1738,72.3414,32.6023C75.1721,38.1034,81.9953,40.1716,87.4057,37.1684C92.8162,34.1652,94.667,27.2823,91.492,21.9723C82.1939,8.22286,66.6703,-0.0111685,50.0676,0.00000859117Z" fill="#275EFB" fill-opacity="1"/></g></g></svg> |
@ -0,0 +1 @@ |
|||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><g><path d="M6.89248,0L18.9247,0C19.5161,0,20,0.473684,20,1.05263L20,18.9474C20,19.5263,19.5161,20,18.9247,20L6.89248,20C6.30108,20,5.81721,19.5263,5.81721,18.9474C5.81721,18.3684,6.30108,17.8947,6.89248,17.8947L17.8495,17.8947L17.8495,2.10526L6.89248,2.10526C6.30108,2.10526,5.81721,1.63158,5.81721,1.05263C5.81721,0.473684,6.30108,0,6.89248,0ZM3.67742,11.051L5.89247,13.1983C6.31473,13.605,6.31955,14.27,5.90322,14.6825C5.48359,15.0901,4.80673,15.0901,4.3871,14.6825L0.322581,10.7352C0.11828,10.5352,0,10.272,0,9.9878C0,9.70359,0.11828,9.44043,0.322581,9.24043L4.37634,5.30359C4.80645,4.90359,5.48387,4.90359,5.90322,5.32464C6.32258,5.73516,6.31183,6.39832,5.89247,6.80885L3.68817,8.94569L11.9785,8.94569C12.5699,8.94569,13.0538,9.41938,13.0538,9.99832C13.0538,10.5773,12.5699,11.051,11.9785,11.051L3.67742,11.051Z" fill-rule="evenodd" fill="#8799AB" fill-opacity="1"/></g></svg> |
After Width: 1028 | Height: 762 | Size: 201 KiB |
@ -1,9 +1,19 @@ |
|||||
import { createApp } from 'vue' |
import { createApp } from 'vue' |
||||
|
import { createPinia } from 'pinia' |
||||
import App from './App.vue' |
import App from './App.vue' |
||||
import Antd from 'ant-design-vue'; |
import Antd from 'ant-design-vue'; |
||||
|
import * as AntdIcons from '@ant-design/icons-vue' |
||||
import "./diframe/style/tailwind.css" |
import "./diframe/style/tailwind.css" |
||||
import "./style/app.css" |
import "./style/app.css" |
||||
import 'ant-design-vue/dist/reset.css'; |
import 'ant-design-vue/dist/reset.css'; |
||||
|
|
||||
const app = createApp(App); |
const app = createApp(App); |
||||
|
app.use(createPinia()); |
||||
app.use(Antd); |
app.use(Antd); |
||||
|
(() => { |
||||
|
let icons = AntdIcons; |
||||
|
for ( let icon in icons ) { |
||||
|
app.component(icon, icons[icon]); |
||||
|
} |
||||
|
})(); |
||||
app.mount('#app'); |
app.mount('#app'); |
@ -0,0 +1,64 @@ |
|||||
|
<template> |
||||
|
<a-row class="h-full"> |
||||
|
<a-col :span="14" class="flex flex-row items-center"> |
||||
|
<div class="p-10"> |
||||
|
<img class="w-full" src="@/assets/img/login-pic.png" /> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
<a-col :span="10" class="flex flex-row items-center p-10"> |
||||
|
<div class="bg-gray-100 p-20 rounded-2xl w-full"> |
||||
|
<div class="text-center"> |
||||
|
<img src="@/assets/icon/logo.svg" class="w-20" /> |
||||
|
</div> |
||||
|
<div class="text-center my-8"> |
||||
|
<span style="font-size:30px;font-weight:500;color:#8799AB;">长春黄金研究院有限公司</span> |
||||
|
</div> |
||||
|
<div class="p-10"> |
||||
|
<div class="mb-2 ml-1">用户名</div> |
||||
|
<div> |
||||
|
<a-input class="rounded-full py-2 px-5" |
||||
|
v-model:value="account" |
||||
|
></a-input> |
||||
|
</div> |
||||
|
<div class="mb-2 mt-8 ml-1">密码</div> |
||||
|
<div> |
||||
|
<a-input-password class="rounded-full py-2 px-5" |
||||
|
v-model:value="password" |
||||
|
></a-input-password> |
||||
|
</div> |
||||
|
<div> |
||||
|
<a-button block type="primary" size="large" class="!rounded-full mt-8" @click="actionLogin">登录</a-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="text-center text-xs mt-10 text-gray-400">CHANGCHUN GOLD RESEARCH INSTITUTE CO.,LTD.</div> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</template> |
||||
|
<script setup> |
||||
|
import { ref } from 'vue'; |
||||
|
import { useAppStore } from '@/stores/AppStore'; |
||||
|
import { Modal } from 'ant-design-vue'; |
||||
|
import ApiClient from '@/utils/ApiClient'; |
||||
|
/** @var {AppStore} */ |
||||
|
const appStore = useAppStore(); |
||||
|
/** @var {String} */ |
||||
|
const account = ref(''); |
||||
|
/** @var {String} */ |
||||
|
const password = ref(''); |
||||
|
|
||||
|
// action login |
||||
|
async function actionLogin() { |
||||
|
try { |
||||
|
const client = ApiClient.getClient(); |
||||
|
let response = await client.userLogin({ |
||||
|
account: account.value, |
||||
|
password: password.value, |
||||
|
}); |
||||
|
appStore.setAccessToken(response.accessToken); |
||||
|
} catch ( e ) { |
||||
|
Modal.error({title: '登录失败',content: e.message}); |
||||
|
return ; |
||||
|
} |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,43 @@ |
|||||
|
<template> |
||||
|
<a-row class="h-full p-1"> |
||||
|
<a-col :span="10" class="p-5"> |
||||
|
<div class="flex flex-col justify-center items-center h-full bg-gray-50 rounded-3xl"> |
||||
|
<div class="text-center mb-10 text-3xl bg-blue-200 p-5 rounded-3xl w-32 text-gray-100">硫酸</div> |
||||
|
<div class="w-full relative"> |
||||
|
<div class="h-full w-full text-center"> |
||||
|
<img class="w-1/2" src="../../../assets/icon/bucket-full.svg" /> |
||||
|
</div> |
||||
|
<div class="h-full w-full text-center absolute top-0 overflow-hidden" :style="{height:`${Math.random()*100}%`}"> |
||||
|
<img class="w-1/2" src="../../../assets/icon/bucket-empty.svg" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="mx-2 p-2 mt-3 rounded-2xl text-3xl" style="background:#D2DFEF;color:#8799AB;"> |
||||
|
<span class="inline-block p-1 rounded-2xl mr-5" style="background:#DCE8F7;">3000g</span> |
||||
|
<span class="inline-block py-1">5000g</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
<a-col :span="10" class="p-5"> |
||||
|
<div class="flex flex-col justify-center items-center h-full bg-gray-50 rounded-3xl"> |
||||
|
<div class="text-center mb-10 text-3xl bg-blue-200 p-5 rounded-3xl w-32 text-gray-100">硫酸</div> |
||||
|
<div class="w-full relative"> |
||||
|
<div class="h-full w-full text-center"> |
||||
|
<img class="w-1/2" src="../../../assets/icon/bucket-full.svg" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="mx-2 p-2 mt-3 rounded-2xl text-3xl" style="background:#D2DFEF;color:#8799AB;"> |
||||
|
<span class="inline-block p-1 rounded-2xl mr-5" style="background:#DCE8F7;">3000g</span> |
||||
|
<span class="inline-block py-1">5000g</span> |
||||
|
</div> |
||||
|
<div class="p-5 text-3xl bg-blue-500 text-white mt-10 rounded-3xl">加载</div> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
<a-col :span="4" class="p-5"> |
||||
|
<div class="flex flex-col justify-center items-center h-full bg-gray-50 rounded-3xl"> |
||||
|
<div v-for="i in 8" :key="i" class="bg-white bg-gray-200 p-5 mb-5 w-3/4 text-center rounded-3xl text-xl text-gray-500" :class="{'!bg-blue-500 !text-white':i==2}"> |
||||
|
硫酸 |
||||
|
</div> |
||||
|
</div> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</template> |
@ -0,0 +1,29 @@ |
|||||
|
<template> |
||||
|
<div class="p-1"> |
||||
|
<a-table :dataSource="dataSource" :columns="columns"></a-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup> |
||||
|
import { ref } from 'vue'; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const columns = [ |
||||
|
{key:'account',dataIndex:'account',title:'用户',align:'center'}, |
||||
|
{key:'slot',dataIndex:'slot',title:'试管架',align:'center'}, |
||||
|
{key:'action',dataIndex:'action',title:'动作',align:'center'}, |
||||
|
{key:'createdAt',dataIndex: 'createdAt',title:'时间',align:'center'}, |
||||
|
]; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const dataSource = ref([ |
||||
|
{account:'admin',slot:'A-1',action:'加入试管',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加酸:硫酸',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加热: 270℃ 15分钟',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加酸:硫酸',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加热: 270℃ 15分钟',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加酸:硫酸',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加热: 270℃ 15分钟',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加酸:硫酸',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加热: 270℃ 15分钟',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加酸:硫酸',createdAt:'2021-08-01 12:00:00'}, |
||||
|
{account:'admin',slot:'A-1',action:'加热: 270℃ 15分钟',createdAt:'2021-08-01 12:00:00'}, |
||||
|
]); |
||||
|
</script> |
@ -0,0 +1,21 @@ |
|||||
|
<template> |
||||
|
<div class="p-1"> |
||||
|
<a-table :dataSource="dataSource" :columns="columns"></a-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup> |
||||
|
import { ref } from 'vue'; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const columns = [ |
||||
|
{key:'name',dataIndex:'name',title:'名称',align:'center'}, |
||||
|
{key:'steps',dataIndex:'steps',title:'步骤',align:'left'}, |
||||
|
{key:'action',dataIndex:'action',title:'操作',align:'center'}, |
||||
|
]; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const dataSource = ref([ |
||||
|
{name:'预设001',steps:'加酸:硫酸 -> 加热: 270℃ 15分钟 -> 加酸:硫酸 -> 加热: 270℃ 15分钟 -> 加酸:硫酸 -> 加热: 270℃ 15分钟',action:'删除 编辑'}, |
||||
|
{name:'预设002',steps:'加酸:盐酸 -> 加热: 270℃ 15分钟 -> 加酸:硫酸 -> 加热: 270℃ 15分钟 加热: 270℃ 15分钟',action:'删除 编辑'}, |
||||
|
{name:'预设003',steps:'加酸:氢氟酸 -> 加热: 270℃ 15分钟 -> 加酸:盐酸 -> 加热: 270℃ 15分钟 -> 加酸:盐酸 -> 加热: 270℃ 15分钟',action:'删除 编辑'}, |
||||
|
{name:'预设004',steps:'加酸:盐酸 -> 加热: 270℃ 15分钟 -> 加酸:氢氟酸 -> 加热: 270℃ 15分钟 -> 加酸:盐酸 -> 加热: 270℃ 15分钟',action:'删除 编辑'}, |
||||
|
]); |
||||
|
</script> |
@ -0,0 +1,33 @@ |
|||||
|
<template> |
||||
|
<div class="p-1"> |
||||
|
<a-table :dataSource="dataSource" :columns="columns"></a-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup> |
||||
|
import { ref } from 'vue'; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const columns = [ |
||||
|
{key:'name',dataIndex:'name',title:'名称',align:'left'}, |
||||
|
{key:'action',dataIndex:'action',title:'操作',align:'right'}, |
||||
|
]; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const dataSource = ref([ |
||||
|
{name:'加液机械臂',action:'复位 最小值 最大值'}, |
||||
|
{name:'蠕动泵01',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵02',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵03',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵04',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵05',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵06',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵07',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵08',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵09',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵10',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵11',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵12',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵13',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵14',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵15',action:'复位 加液 回抽'}, |
||||
|
{name:'蠕动泵16',action:'复位 加液 回抽'}, |
||||
|
]); |
||||
|
</script> |
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<div class="p-1"> |
||||
|
<a-table :dataSource="dataSource" :columns="columns"> |
||||
|
<template #bodyCell="{ column, record }"> |
||||
|
<template v-if="column.key === 'roleName'"> |
||||
|
{{ record.role.name }} |
||||
|
</template> |
||||
|
<template v-else-if="'createdAt' === column.key"> |
||||
|
{{ formatCreatedAt(record.createdAt) }} |
||||
|
</template> |
||||
|
<template v-else-if="'action' === column.key"> |
||||
|
<a-popconfirm title="是否删除该用户?" @confirm="actionDelete(record)"> |
||||
|
<a-button class="ml-1" disabled>删除</a-button> |
||||
|
</a-popconfirm> |
||||
|
|
||||
|
<a-button class="ml-1" disabled>修改权限</a-button> |
||||
|
<a-button class="ml-1" disabled>修改密码</a-button> |
||||
|
</template> |
||||
|
</template> |
||||
|
</a-table> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup> |
||||
|
import ApiClient from '@/utils/ApiClient'; |
||||
|
import { onMounted, ref } from 'vue'; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const columns = [ |
||||
|
{key:'account',dataIndex:'account',title:'用户名',align:'center'}, |
||||
|
{key:'roleName',title:'权限',align:'center'}, |
||||
|
{key:'createdAt',dataIndex: 'createdAt',title:'创建时间',align:'center'}, |
||||
|
{key:'action',title:'操作',align:'center'}, |
||||
|
]; |
||||
|
/** @var {Array<Object>} */ |
||||
|
const dataSource = ref([]); |
||||
|
/** @var {ApiClient} */ |
||||
|
let client = null; |
||||
|
// on mounted |
||||
|
onMounted(mounted); |
||||
|
|
||||
|
// mounted |
||||
|
async function mounted() { |
||||
|
client = ApiClient.getClient(); |
||||
|
await refresh(); |
||||
|
} |
||||
|
|
||||
|
// refresh |
||||
|
async function refresh() { |
||||
|
let response = await client.userList(); |
||||
|
dataSource.value = structuredClone(response.list); |
||||
|
} |
||||
|
|
||||
|
// format created at |
||||
|
function formatCreatedAt(createdAt) { |
||||
|
if ( 0 === createdAt ) { |
||||
|
return ''; |
||||
|
} |
||||
|
|
||||
|
let time = new Date(createdAt); |
||||
|
let timeString = []; |
||||
|
timeString.push(time.getFullYear() + '-'); |
||||
|
timeString.push((time.getMonth() + 1).toString().padStart(2,'0') + '-'); |
||||
|
timeString.push(time.getDate().toString().padStart(2,'0') + ' '); |
||||
|
timeString.push(time.getHours().toString().padStart(2,'0') + ':'); |
||||
|
timeString.push(time.getMinutes().toString().padStart(2,'0') + ':'); |
||||
|
timeString.push(time.getSeconds().toString().padStart(2,'0')); |
||||
|
return timeString.join(''); |
||||
|
} |
||||
|
|
||||
|
// action delete |
||||
|
async function actionDelete(record) { |
||||
|
await client.userDelete(record.id); |
||||
|
await refresh(); |
||||
|
} |
||||
|
</script> |
@ -0,0 +1,16 @@ |
|||||
|
import { defineStore } from 'pinia' |
||||
|
export const useAppStore = defineStore('AppStore', { |
||||
|
state: () => { |
||||
|
return { |
||||
|
accessToken : null, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
// set access token
|
||||
|
actions: { |
||||
|
// set access token
|
||||
|
setAccessToken( token ) { |
||||
|
this.accessToken = token; |
||||
|
}, |
||||
|
}, |
||||
|
}) |
@ -1,4 +1,9 @@ |
|||||
const { defineConfig } = require('@vue/cli-service') |
const { defineConfig } = require('@vue/cli-service') |
||||
module.exports = defineConfig({ |
module.exports = defineConfig({ |
||||
transpileDependencies: true |
|
||||
|
transpileDependencies: true, |
||||
|
|
||||
|
// @link https://cli.vuejs.org/config/#devserver
|
||||
|
devServer : { |
||||
|
port : 9001, |
||||
|
}, |
||||
}) |
}) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue