Browse Source

表单晴空

master
maochaoying 2 years ago
parent
commit
5b8ca3d05b
  1. 20
      .env
  2. 2
      src/api/task.js
  3. 35
      src/components/Nuclear.vue
  4. 2
      src/components/User.vue
  5. 62
      src/pages/index.vue
  6. 1
      test.java

20
.env

@ -5,14 +5,14 @@
# VITE_HOST_URL=http://192.168.1.194:8081/ # VITE_HOST_URL=http://192.168.1.194:8081/
VITE_BASE_URL=http://127.0.0.1:8899
VITE_WEBSOCKET_JAVA_URL=ws://127.0.0.1:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8081/ws/cmd
VITE_HOST_URL=http://127.0.0.1:8081/
# VITE_BASE_URL=http://192.168.1.111:8899
# VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.111:8899/websocket/nuclear
# VITE_BASE_URL=http://127.0.0.1:8899
# VITE_WEBSOCKET_JAVA_URL=ws://127.0.0.1:8899/websocket/nuclear
# # VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear # # VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.111:8081/ws/cmd
# VITE_HOST_URL=http://192.168.1.111:8081/
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8081/ws/cmd
# VITE_HOST_URL=http://127.0.0.1:8081/
VITE_BASE_URL=http://192.168.1.111:8899
VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.111:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.111:8081/ws/cmd
VITE_HOST_URL=http://192.168.1.111:8081/

2
src/api/task.js

@ -7,7 +7,7 @@ export const createTaskApi = data => {
method: 'POST', method: 'POST',
data: { data: {
...data, ...data,
publishedId: Cookie.getCookie('u'),
publishedId: Cookie.getCookie('u') || '',
}, },
}) })
} }

35
src/components/Nuclear.vue

@ -86,12 +86,6 @@
placeholder="请输入名称" placeholder="请输入名称"
></t-input> ></t-input>
</t-form-item> </t-form-item>
<t-form-item label="序列号" name="serialNumber">
<t-input
v-model="coreForm.serialNumber"
placeholder="请输入序列号"
></t-input>
</t-form-item>
<t-form-item label="所属核电站" name="stationId"> <t-form-item label="所属核电站" name="stationId">
<t-select <t-select
v-model="coreForm.stationId" v-model="coreForm.stationId"
@ -151,7 +145,6 @@ export default {
coreForm: { coreForm: {
name: '', name: '',
stationId: '', stationId: '',
serialNumber: '',
}, },
stationForm: { stationForm: {
name: '', name: '',
@ -176,14 +169,6 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
serialNumber: [
{
required: true,
message: '序列号必填',
type: 'error',
trigger: 'blur',
},
],
stationId: [ stationId: [
{ {
required: true, required: true,
@ -224,10 +209,6 @@ export default {
title: '名称', title: '名称',
}, },
{ {
colKey: 'serialNumber',
title: '序列号',
},
{
colKey: 'stationName', colKey: 'stationName',
title: '所属核电站', title: '所属核电站',
}, },
@ -256,6 +237,10 @@ export default {
this.$message.success('提交成功') this.$message.success('提交成功')
this.coreVisible = false this.coreVisible = false
this.getCoreList() this.getCoreList()
this.coreForm = {
name: '',
address: '',
}
} }
} else { } else {
this.$message.error(res?.msg) this.$message.error(res?.msg)
@ -275,6 +260,10 @@ export default {
this.$message.success('提交成功') this.$message.success('提交成功')
this.stationVisible = false this.stationVisible = false
this.getStationList() this.getStationList()
this.stationForm = {
name: '',
address: '',
}
} }
} else { } else {
this.$message.error(res?.msg) this.$message.error(res?.msg)
@ -328,9 +317,17 @@ export default {
}) })
}, },
stationClose() { stationClose() {
this.stationForm = {
name: '',
address: '',
}
this.stationVisible = false this.stationVisible = false
}, },
coreClose() { coreClose() {
this.coreForm = {
name: '',
address: '',
}
this.coreVisible = false this.coreVisible = false
}, },
async getStationList() { async getStationList() {

2
src/components/User.vue

@ -194,6 +194,7 @@ export default {
methods: { methods: {
handleClose() { handleClose() {
this.formData = { ...INITIAL_DATA }
this.visible = false this.visible = false
}, },
onReset() { onReset() {
@ -227,6 +228,7 @@ export default {
// //
const res = await addUserApi(this.formData) const res = await addUserApi(this.formData)
if (res?.code == 200) { if (res?.code == 200) {
this.formData = { ...INITIAL_DATA }
this.visible = false this.visible = false
this.$message.success('提交成功') this.$message.success('提交成功')
this.getUserList() this.getUserList()

62
src/pages/index.vue

@ -43,6 +43,31 @@
</g> </g>
</svg> </svg>
<div class="menu_list"> <div class="menu_list">
<div
class="menu"
@click="accountStore.changePage(2)"
v-if="role == 'ROLE_ADMIN'"
>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="30.133363723754883"
height="25.885509490966797"
viewBox="0 0 30.133363723754883 25.885509490966797"
>
<g>
<path
d="M2.16892,25.8855L24.069,25.8855C25.1625,25.8855,26.2349,24.7739,26.2319,23.6413L26.2439,8.84358L26.3523,8.73556L26.2955,8.67851L29.7384,5.03974C30.2655,4.48244,30.2655,3.58776,29.7354,3.04252L27.2441,0.418722C26.9911,0.153631,26.6296,0,26.253,0C25.8765,0,25.515,0.153631,25.2619,0.418722L20.1921,5.74162L2.16591,5.76271C0.966979,5.76271,0,6.99177,0,8.00996L0,23.6383C0,24.2076,0.250029,24.783,0.686826,25.2198C1.11157,25.6445,1.65079,25.8855,2.16892,25.8855ZM25.045,8.33916L25.0451,8.24794L28.8648,4.20229C28.9491,4.11192,28.9521,3.95527,28.8708,3.87394L28.8648,3.86792L26.3705,1.24412C26.3313,1.20797,26.2741,1.20496,26.253,1.20496C26.2289,1.20496,26.1747,1.20797,26.1355,1.25014L21.3025,6.32475L21.3336,6.35593L14.7003,12.9952C14.6732,13.0193,14.6582,13.0495,14.6491,13.0796L14.6401,13.1127L13.5508,16.25C14.7659,16.2318,15.9935,16.1717,16.5169,16.0436C16.7036,15.9984,16.8633,15.9593,17.0019,15.9262C17.276,15.8599,17.5381,15.7966,17.5863,15.7665Q17.5923,15.7635,17.6043,15.7514L17.6134,15.7424L25.045,8.33916ZM19.0383,6.94821L13.8508,12.1427C13.6701,12.3205,13.5436,12.5404,13.4833,12.7814L12.2743,16.2546L12.2634,16.2545L12.2423,16.2545L12.242,16.3472L11.9922,17.065L12.24,17.1509L12.2393,17.4595L12.2513,17.4595C12.3688,17.4625,12.5224,17.4625,12.7062,17.4625C13.7997,17.4625,15.9174,17.4354,16.806,17.2185C16.9898,17.1703,17.1495,17.1341,17.282,17.101C17.9146,16.9504,18.1797,16.8841,18.4629,16.5949L25.0436,10.0392L25.033,23.6353C25.033,24.1293,24.4606,24.6775,24.072,24.6775L2.17194,24.6775C1.79237,24.6775,1.21098,24.2106,1.21098,23.6353L1.21098,8.00695C1.21098,7.58521,1.71706,6.96466,2.17194,6.96466L19.0383,6.94821ZM20.4996,19.493L5.75994,19.493C5.53703,19.493,5.35327,19.3093,5.35327,19.0864L5.35327,18.6948C5.35327,18.4718,5.53703,18.2881,5.75994,18.2881L20.4996,18.2881C20.7225,18.2881,20.9063,18.4718,20.9063,18.6948L20.9063,19.0864C20.9063,19.3093,20.7225,19.493,20.4996,19.493Z"
fill-rule="evenodd"
fill="#FFFFFF"
fill-opacity="1"
/>
</g>
</svg>
<p class="title">发布任务</p>
</div>
<div class="menu" @click="clickTaskTab"> <div class="menu" @click="clickTaskTab">
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -91,7 +116,7 @@
</div> </div>
<div <div
class="menu" class="menu"
@click="accountStore.changePage(2)"
@click="accountStore.changePage(5)"
v-if="role == 'ROLE_ADMIN'" v-if="role == 'ROLE_ADMIN'"
> >
<svg <svg
@ -99,20 +124,19 @@
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="30.133363723754883"
height="25.885509490966797"
viewBox="0 0 30.133363723754883 25.885509490966797"
width="30"
height="21.657630920410156"
viewBox="0 0 30 21.657630920410156"
> >
<g> <g>
<path <path
d="M2.16892,25.8855L24.069,25.8855C25.1625,25.8855,26.2349,24.7739,26.2319,23.6413L26.2439,8.84358L26.3523,8.73556L26.2955,8.67851L29.7384,5.03974C30.2655,4.48244,30.2655,3.58776,29.7354,3.04252L27.2441,0.418722C26.9911,0.153631,26.6296,0,26.253,0C25.8765,0,25.515,0.153631,25.2619,0.418722L20.1921,5.74162L2.16591,5.76271C0.966979,5.76271,0,6.99177,0,8.00996L0,23.6383C0,24.2076,0.250029,24.783,0.686826,25.2198C1.11157,25.6445,1.65079,25.8855,2.16892,25.8855ZM25.045,8.33916L25.0451,8.24794L28.8648,4.20229C28.9491,4.11192,28.9521,3.95527,28.8708,3.87394L28.8648,3.86792L26.3705,1.24412C26.3313,1.20797,26.2741,1.20496,26.253,1.20496C26.2289,1.20496,26.1747,1.20797,26.1355,1.25014L21.3025,6.32475L21.3336,6.35593L14.7003,12.9952C14.6732,13.0193,14.6582,13.0495,14.6491,13.0796L14.6401,13.1127L13.5508,16.25C14.7659,16.2318,15.9935,16.1717,16.5169,16.0436C16.7036,15.9984,16.8633,15.9593,17.0019,15.9262C17.276,15.8599,17.5381,15.7966,17.5863,15.7665Q17.5923,15.7635,17.6043,15.7514L17.6134,15.7424L25.045,8.33916ZM19.0383,6.94821L13.8508,12.1427C13.6701,12.3205,13.5436,12.5404,13.4833,12.7814L12.2743,16.2546L12.2634,16.2545L12.2423,16.2545L12.242,16.3472L11.9922,17.065L12.24,17.1509L12.2393,17.4595L12.2513,17.4595C12.3688,17.4625,12.5224,17.4625,12.7062,17.4625C13.7997,17.4625,15.9174,17.4354,16.806,17.2185C16.9898,17.1703,17.1495,17.1341,17.282,17.101C17.9146,16.9504,18.1797,16.8841,18.4629,16.5949L25.0436,10.0392L25.033,23.6353C25.033,24.1293,24.4606,24.6775,24.072,24.6775L2.17194,24.6775C1.79237,24.6775,1.21098,24.2106,1.21098,23.6353L1.21098,8.00695C1.21098,7.58521,1.71706,6.96466,2.17194,6.96466L19.0383,6.94821ZM20.4996,19.493L5.75994,19.493C5.53703,19.493,5.35327,19.3093,5.35327,19.0864L5.35327,18.6948C5.35327,18.4718,5.53703,18.2881,5.75994,18.2881L20.4996,18.2881C20.7225,18.2881,20.9063,18.4718,20.9063,18.6948L20.9063,19.0864C20.9063,19.3093,20.7225,19.493,20.4996,19.493Z"
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"
/> />
</g> </g>
</svg> </svg>
<p class="title">发布任务</p>
<p class="title">堆芯信息</p>
</div> </div>
<div class="menu" @click="accountStore.changePage(4)"> <div class="menu" @click="accountStore.changePage(4)">
<svg <svg
@ -135,30 +159,6 @@
</svg> </svg>
<p class="title">相机调试</p> <p class="title">相机调试</p>
</div> </div>
<div
class="menu"
@click="accountStore.changePage(5)"
v-if="role == 'ROLE_ADMIN'"
>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="30"
height="21.657630920410156"
viewBox="0 0 30 21.657630920410156"
>
<g>
<path
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-opacity="1"
/>
</g>
</svg>
<p class="title">基本信息</p>
</div>
</div> </div>
<t-popup class="placement bottom center" overlayStyle> <t-popup class="placement bottom center" overlayStyle>
<template v-slot:content> <template v-slot:content>

1
test.java

@ -0,0 +1 @@
double c1_result = c1_C*(Math.pow((c1_A-(c1_k1*CoorRGB_c1.getR() + c1_k2*CoorRGB_c1.getG() + c1_k3*CoorRGB_c1.getB()))/((c1_k1*CoorRGB_c1.getR() + c1_k2*CoorRGB_c1.getG() + c1_k3*CoorRGB_c1.getB())-c1_D),1/c1_B));
Loading…
Cancel
Save