This commit is contained in:
pan 2024-09-09 01:18:21 +08:00
parent 05f662c0c7
commit 6a5157ae7d
9 changed files with 56 additions and 30 deletions

View File

@ -54,7 +54,6 @@
"pizzip": "3.1.7", "pizzip": "3.1.7",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sockjs-client": "^1.6.1",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"v-viewer": "1.6.4", "v-viewer": "1.6.4",
"vue": "2.6.12", "vue": "2.6.12",
@ -66,8 +65,7 @@
"vue-meta": "2.4.0", "vue-meta": "2.4.0",
"vue-router": "3.4.9", "vue-router": "3.4.9",
"vue-video-player": "5.0.1", "vue-video-player": "5.0.1",
"vuex": "3.6.0", "vuex": "3.6.0"
"websocket": "^1.0.35"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "4.4.6", "@vue/cli-plugin-babel": "4.4.6",

View File

@ -9,6 +9,7 @@
import ThemePicker from "@/components/ThemePicker"; import ThemePicker from "@/components/ThemePicker";
import store from '@/store' import store from '@/store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import { getToken } from '@/utils/auth'
export default { export default {
name: "App", name: "App",
@ -22,7 +23,9 @@ export default {
} }
}, },
created() { created() {
store.dispatch('GetUserMsgCount').then(() => { }) if (getToken()) {
store.dispatch('GetUserMsgCount').then(() => { })
}
}, },
methods:{ methods:{

View File

@ -42,15 +42,15 @@
header-align="left" header-align="left"
> >
<el-table-column type="selection" width="50" align="center" v-if="multiple" :selectable="(row,index)=>selectableFun(row,index,toolData,selectInfoData)"/> <el-table-column type="selection" width="50" align="center" v-if="multiple" :selectable="(row,index)=>selectableFun(row,index,toolData,selectInfoData)"/>
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode"/> <el-table-column label="工具编号" key="toolCode" prop="toolCode"/>
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName":show-overflow-tooltip="true" /> <el-table-column label="工具名称" key="toolName" prop="toolName":show-overflow-tooltip="true" />
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" :show-overflow-tooltip="true" > <el-table-column label="工具类别" key="toolType" prop="toolType" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/> <dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" /> <el-table-column label="归属单位" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" />
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" /> <el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" />
<el-table-column label="操作" v-if="!multiple" width="100px" class-name="small-padding fixed-width"> <el-table-column label="操作" v-if="!multiple" width="100px" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button

View File

@ -45,7 +45,7 @@ export default {
}, },
computed: { computed: {
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews ? this.$store.state.tagsView.visitedViews : []
}, },
routes() { routes() {
return this.$store.state.permission.routes return this.$store.state.permission.routes
@ -140,14 +140,15 @@ export default {
return false return false
}, },
moveToCurrentTag() { moveToCurrentTag() {
let self = this
const tags = this.$refs.tag const tags = this.$refs.tag
this.$nextTick(() => { self.$nextTick(() => {
for (const tag of tags) { for (const tag of tags) {
if (tag.to.path === this.$route.path) { if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag) self.$refs.scrollPane.moveToTarget(tag)
// when query is different then update // when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) { if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('tagsView/updateVisitedView', this.$route) self.$store.dispatch('tagsView/updateVisitedView', self.$route)
} }
break break
} }

View File

@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register'] const whiteList = ['/login', '/register', '/workflow/msg/count/']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
@ -37,6 +37,7 @@ router.beforeEach((to, from, next) => {
next({ path: '/' }) next({ path: '/' })
}) })
}) })
store.dispatch('GetUserMsgCount').then(() => { })
} else { } else {
next() next()
} }

View File

@ -30,10 +30,10 @@
} }
}, },
created(){ created(){
this.initWebSocket(); // this.initWebSocket();
}, },
methods: { methods: {
initWebSocket() { /* initWebSocket() {
this.websocket = new WebSocket(process.env.VUE_APP_WS_URL); this.websocket = new WebSocket(process.env.VUE_APP_WS_URL);
this.websocket.onmessage = (event) => { this.websocket.onmessage = (event) => {
this.uploading = true; this.uploading = true;
@ -52,8 +52,8 @@
} }
}) })
console.log('this.progressArr=' + this.progressArr); console.log('this.progressArr=' + this.progressArr);
/* let progress = msgStr.substring(msgStr.indexOf("/") + 1, msgStr.length); /!* let progress = msgStr.substring(msgStr.indexOf("/") + 1, msgStr.length);
this.progress = parseInt(msgArr[2])*/ this.progress = parseInt(msgArr[2])*!/
// if (progress === '100%') { // if (progress === '100%') {
// this.websocket.close(); // this.websocket.close();
// } // }
@ -61,7 +61,7 @@
this.websocket.onclose = () => { this.websocket.onclose = () => {
console.log('WebSocket connection closed'); console.log('WebSocket connection closed');
}; };
}, }, */
checkDuplicate(docId) { checkDuplicate(docId) {
return this.progressArr.findIndex(t => t['docId'] == docId) == -1 return this.progressArr.findIndex(t => t['docId'] == docId) == -1
} }

View File

@ -175,7 +175,7 @@ export default {
previewUrl: '', previewUrl: '',
progress: 0, progress: 0,
fileList: [], fileList: [],
websocket: null, // websocket: null,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,

View File

@ -20,11 +20,9 @@
<el-col :span="12"> <el-form-item label="备注">{{detailData.remark}}</el-form-item> </el-col> <el-col :span="12"> <el-form-item label="备注">{{detailData.remark}}</el-form-item> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="关联工具"> <el-form-item label="关联工具">
<el-button type="primary" icon="el-icon-search" size="mini" v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined" @click="getToolRelationTree">查看</el-button> <span v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined">
<el-tag :key="tag.toolId" v-for="tag in detailData.association" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
<!-- <span v-if="detailData.association != null && detailData.association != '' && detailData.association != undefined"> </span>
<el-tag :key="tag.toolId" v-for="tag in JSON.parse(detailData.association)" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
</span>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -192,15 +192,15 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="关联工具" prop="association"> <el-form-item label="关联工具" prop="association">
<el-button type="primary" icon="el-icon-search" size="mini" @click="getToolRelationTree">查看</el-button> <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="getToolRelationTree">查看</el-button>
<el-button type="primary" icon="el-icon-check" size="mini" @click="handleToolSelect">新增关联工具</el-button> <el-button type="primary" icon="el-icon-check" size="mini" @click="handleToolSelect">新增关联工具</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleToolEdit">编辑关联工具</el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleToolEdit">编辑关联工具</el-button>-->
<!-- <el-select <el-select
:disabled="!editStatus" :disabled="!editStatus"
v-model="form.association" v-model="form.association"
ref="selectHeadTool" ref="selectHeadTool"
multiple
value-key="toolId" value-key="toolId"
multiple
filterable filterable
remote remote
placeholder="请选择关联工具" placeholder="请选择关联工具"
@ -211,7 +211,7 @@
:label="item.toolName" :label="item.toolName"
:value="item"> :value="item">
</el-option> </el-option>
</el-select>--> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -740,6 +740,10 @@ export default {
saveForm() { saveForm() {
let _this = this let _this = this
_this.$refs["eForm"].validate(valid => { _this.$refs["eForm"].validate(valid => {
if(_this.attachmentList.length == 0){
_this.$message.warning("最少上传一个附件");
return;
}
if (valid) { if (valid) {
if (!_this.procDefKey) { if (!_this.procDefKey) {
_this.$message.warning("尚未进行流程设置,将无法发起流程!"); _this.$message.warning("尚未进行流程设置,将无法发起流程!");
@ -858,6 +862,10 @@ export default {
dialogVisible = false dialogVisible = false
} }
} }
if(this.attachmentList.length == 0){
_this.$message.warning("最少上传一个附件");
return true;
}
_this.searchQuery.pass = _this.formSubmit.pass _this.searchQuery.pass = _this.formSubmit.pass
let defaultStaff = [] let defaultStaff = []
this.defaultStaff=defaultStaff this.defaultStaff=defaultStaff
@ -1188,6 +1196,23 @@ export default {
self.toolTreeLoading = false; self.toolTreeLoading = false;
}); });
}, },
toolSelect(){
/* this.$refs.selectHeadTool.blur();
this.$nextTick(()=>{
this.$refs.toolSelect.init(null,null,true)
}) */
let self = this
this.$refs.selectHeadTool.blur();
let toolIds = []
if(self.form.association && self.form.association.length > 0){
self.form.association.forEach(item=>{
toolIds.push(item.toolId)
})
}
this.$nextTick(()=>{
this.$refs.toolSelect.init(null,null,true, toolIds)
})
},
}, },