Browse Source

发布者

master
maochaoying 2 years ago
parent
commit
1dbc9dc946
  1. 20
      .env
  2. 6
      src/api/task.js
  3. 14
      src/components/Nuclear.vue
  4. 6
      src/components/Publish.vue
  5. 9
      src/components/Task.vue
  6. 16
      src/pages/index.vue

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/

6
src/api/task.js

@ -1,10 +1,14 @@
import request from '@/service' import request from '@/service'
import Cookie from '@/utils/cookie'
export const createTaskApi = data => { export const createTaskApi = data => {
return request({ return request({
url: '/task/create', url: '/task/create',
method: 'POST', method: 'POST',
data,
data: {
...data,
publishedId: Cookie.getCookie('u'),
},
}) })
} }

14
src/components/Nuclear.vue

@ -58,16 +58,16 @@
/> />
</div> </div>
</t-tab-panel> </t-tab-panel>
<t-tab-panel value="second" label="核芯堆信息管理">
<t-tab-panel value="second" label="堆芯信息管理">
<div style="padding: 25px"> <div style="padding: 25px">
<t-button <t-button
theme="primary" theme="primary"
style="margin-bottom: 25px" style="margin-bottom: 25px"
@click="coreVisible = true" @click="coreVisible = true"
>新增核芯堆</t-button
>新增堆芯</t-button
> >
<t-dialog <t-dialog
header="新增核芯堆"
header="新增堆芯"
:visible="coreVisible" :visible="coreVisible"
:footer="false" :footer="false"
:onClose="coreClose" :onClose="coreClose"
@ -184,6 +184,14 @@ export default {
trigger: 'blur', trigger: 'blur',
}, },
], ],
stationId: [
{
required: true,
message: '所属核电站不能为空',
type: 'error',
trigger: 'blur',
},
],
}, },
tabValue: 'first', tabValue: 'first',
stationVisible: false, stationVisible: false,

6
src/components/Publish.vue

@ -41,13 +41,13 @@
</t-option> </t-option>
</t-select> </t-select>
</t-form-item> </t-form-item>
<t-form-item label="核芯堆" name="nuclearCoreId">
<t-form-item label="堆芯" name="nuclearCoreId">
<t-select <t-select
v-model="formData.nuclearCoreId" v-model="formData.nuclearCoreId"
class="demo-select-base" class="demo-select-base"
clearable clearable
filterable filterable
placeholder="请选择所在核芯堆"
placeholder="请选择所在堆芯"
> >
<t-option <t-option
v-for="item in coreList" v-for="item in coreList"
@ -108,7 +108,7 @@ export default {
pubRules: { pubRules: {
taskName: [{ required: true, message: '请填写任务名称' }], taskName: [{ required: true, message: '请填写任务名称' }],
operatorId: [{ required: true, message: '请选择要分配的操作员' }], operatorId: [{ required: true, message: '请选择要分配的操作员' }],
nuclearCoreId: [{ required: true, message: '请选择核芯堆' }],
nuclearCoreId: [{ required: true, message: '请选择堆芯' }],
nuclearStationId: [{ required: true, message: '请选择核电站' }], nuclearStationId: [{ required: true, message: '请选择核电站' }],
checkOrder: [{ required: true, message: '核查路径顺序必填' }], checkOrder: [{ required: true, message: '核查路径顺序必填' }],
}, },

9
src/components/Task.vue

@ -160,6 +160,11 @@ export default {
width: 130, width: 130,
}, },
{ {
colKey: 'publishedId',
title: '发布者',
width: 130,
},
{
colKey: 'publishTime', colKey: 'publishTime',
title: '发布时间', title: '发布时间',
width: 190, width: 190,
@ -441,6 +446,8 @@ export default {
if (res?.code == 200) { if (res?.code == 200) {
this.pathVisible = false this.pathVisible = false
this.$message.success('设置成功') this.$message.success('设置成功')
// list
this.getTaskList()
} }
}, },
showPathDialog(taskId) { showPathDialog(taskId) {
@ -622,7 +629,7 @@ export default {
<style lang="scss"> <style lang="scss">
.task_component { .task_component {
height: 100vh;
height: 90vh;
overflow: scroll; overflow: scroll;
} }
.process_table_btn { .process_table_btn {

16
src/pages/index.vue

@ -444,13 +444,13 @@ const nickname = computed(() => {
}) })
const clickLogo = () => { const clickLogo = () => {
//
imageStore.reset()
taskStore.updateCurrentDetailTaskId(null)
accountStore.changePage(0)
//
taskStore.updateType(0)
getInitData()
// //
// imageStore.reset()
// taskStore.updateCurrentDetailTaskId(null)
// accountStore.changePage(0)
// //
// taskStore.updateType(0)
// getInitData()
} }
const getInitData = async () => { const getInitData = async () => {
@ -490,7 +490,7 @@ const clickTaskTab = () => {
const logout = () => { const logout = () => {
accountStore.clearLoginInfo() accountStore.clearLoginInfo()
Cookie.clearAllCookie() Cookie.clearAllCookie()
window.location.href = '/login'
window.location.href = '/#/login'
} }
const getSocketdata = res => { const getSocketdata = res => {

Loading…
Cancel
Save