Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kd_control
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
kd_control
Commits
ba093436
Commit
ba093436
authored
Sep 06, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件锁
parent
1ae4ae2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
40 deletions
+112
-40
common.js
src/assets/js/common.js
+28
-0
index.vue
src/views/productionPlanManagement/mineFile/index.vue
+84
-40
No files found.
src/assets/js/common.js
View file @
ba093436
...
@@ -3212,6 +3212,28 @@ var HttpReq = function(){
...
@@ -3212,6 +3212,28 @@ var HttpReq = function(){
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
},
},
//开采管理-文件锁
isTheFileLocked
:
function
(
params
){
return
request
({
url
:
'
/api/miningManagement/isTheFileLocked?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
//开采管理-文件锁
setFileValidityPeriod
:
function
(
params
){
return
request
({
url
:
'
/api/miningManagement/setFileValidityPeriod?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
//开采管理-文件锁
deleteFileEditingTags
:
function
(
data
){
return
request
({
url
:
'
/api/miningManagement/deleteFileEditingTags
'
,
method
:
'
delete
'
,
data
:
data
,
})
},
//开采管理-删除文件
//开采管理-删除文件
deleteExcelOrFbx
:
function
(
data
){
deleteExcelOrFbx
:
function
(
data
){
return
request
({
return
request
({
...
@@ -3220,6 +3242,12 @@ var HttpReq = function(){
...
@@ -3220,6 +3242,12 @@ var HttpReq = function(){
data
:
data
,
data
:
data
,
})
})
},
},
scQueryByUrl
:
function
(
params
){
return
request
({
url
:
'
/api/fileEditingRecord/queryByUrl?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
//后台首页指标
//后台首页指标
backgroundHomepage
:
function
(
params
){
backgroundHomepage
:
function
(
params
){
return
request
({
return
request
({
...
...
src/views/productionPlanManagement/mineFile/index.vue
View file @
ba093436
...
@@ -43,13 +43,10 @@
...
@@ -43,13 +43,10 @@
<el-table-column
prop=
"modificationTime"
label=
"上传时间"
align=
"center"
></el-table-column>
<el-table-column
prop=
"modificationTime"
label=
"上传时间"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
v-if=
"query.type==='excel'"
size=
"mini"
type=
"text"
icon=
"el-icon-view"
<el-button
v-if=
"query.type==='excel'"
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"viewTable(scope.row)"
>
编辑
</el-button>
@
click=
"viewTable(scope.row)"
>
在线预览
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-download"
@
click=
"downloadFile(scope.row)"
>
下载
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-download"
@
click=
"downloadFile(scope.row)"
>
下载
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"toDelete(scope.row)"
>
删除
</el-button>
<
!--
<el-progress
type=
"dashboard"
:percentage=
"scope.row.percentage||20"
:color=
"colors"
></el-progress>
--
>
<
el-button
size=
"mini"
type=
"text"
icon=
"el-icon-tickets"
@
click=
"openLog(scope.row)"
>
记录
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -71,8 +68,7 @@
...
@@ -71,8 +68,7 @@
<el-button
type=
"primary"
@
click=
"updataEcxel"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"updataEcxel"
>
保存
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible.sync=
"uploadVisible"
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible.sync=
"uploadVisible"
title=
"文件上传"
width=
"560px"
>
title=
"文件上传"
width=
"560px"
>
<el-form
ref=
"form"
:model=
"form"
size=
"small"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
size=
"small"
label-width=
"80px"
>
<!-- 上传文件 -->
<!-- 上传文件 -->
<el-form-item
label=
""
>
<el-form-item
label=
""
>
...
@@ -97,7 +93,22 @@
...
@@ -97,7 +93,22 @@
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"upload"
>
确认
</el-button>
<el-button
:loading=
"loading"
type=
"primary"
@
click=
"upload"
>
确认
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible.sync=
"logVisible"
title=
"编辑日志"
width=
"800px"
>
<el-table
:data=
"logData"
border
style=
"width:auto"
>
<el-table-column
prop=
"nickName"
label=
"编辑人"
align=
"center"
></el-table-column>
<el-table-column
prop=
"phone"
label=
"联系电话"
align=
"center"
></el-table-column>
<el-table-column
prop=
"updateTime"
label=
"编辑时间"
align=
"center"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status==='完成'"
style=
"color:gray"
>
{{
scope
.
row
.
status
}}
</span>
<span
v-else
style=
"color:forestgreen"
>
{{
scope
.
row
.
status
}}
</span>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
>
<el-button
@
click=
"cancelForm"
>
关闭
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -111,15 +122,13 @@ export default {
...
@@ -111,15 +122,13 @@ export default {
name
:
'
visitPeople
'
,
name
:
'
visitPeople
'
,
data
()
{
data
()
{
return
{
return
{
colors
:
[{
color
:
'
#f56c6c
'
,
percentage
:
20
},
{
color
:
'
#e6a23c
'
,
percentage
:
40
},
{
colors
:
[{
color
:
'
#f56c6c
'
,
percentage
:
20
},
{
color
:
'
#e6a23c
'
,
percentage
:
40
},
{
color
:
'
#5cb87a
'
,
percentage
:
60
},
{
color
:
'
#1989fa
'
,
percentage
:
80
},
{
color
:
'
#6f7ad3
'
,
percentage
:
100
}],
color
:
'
#5cb87a
'
,
percentage
:
60
},
{
color
:
'
#1989fa
'
,
percentage
:
80
},
{
color
:
'
#6f7ad3
'
,
percentage
:
100
}],
title
:
''
,
title
:
''
,
fileUploadApi
:
''
,
fileUploadApi
:
''
,
headers
:
{
'
Authorization
'
:
getToken
()},
headers
:
{
'
Authorization
'
:
getToken
()},
visible
:
false
,
visible
:
false
,
uploadVisible
:
false
,
uploadVisible
:
false
,
logVisible
:
false
,
loading
:
false
,
loading
:
false
,
query
:
{
query
:
{
type
:
'
excel
'
,
type
:
'
excel
'
,
...
@@ -137,7 +146,9 @@ export default {
...
@@ -137,7 +146,9 @@ export default {
activeTab
:
'
Sheet1
'
,
activeTab
:
'
Sheet1
'
,
excelTableData
:
[],
excelTableData
:
[],
form
:
{},
form
:
{},
xs
:
null
xs
:
null
,
fileSocketTimer
:
null
,
logData
:
[]
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -146,6 +157,14 @@ export default {
...
@@ -146,6 +157,14 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
openLog
(
item
)
{
this
.
logVisible
=
true
HttpReq
.
truckDispatching
.
scQueryByUrl
({
url
:
item
.
url
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
this
.
logData
=
res
.
data
;
}
})
},
stox
(
wb
)
{
stox
(
wb
)
{
var
out
=
[];
var
out
=
[];
wb
.
SheetNames
.
forEach
(
function
(
name
)
{
wb
.
SheetNames
.
forEach
(
function
(
name
)
{
...
@@ -269,15 +288,21 @@ export default {
...
@@ -269,15 +288,21 @@ export default {
})
})
},
},
viewTable
(
item
)
{
viewTable
(
item
)
{
if
(
item
.
isLoading
)
{
this
.
openFile
=
item
HttpReq
.
truckDispatching
.
isTheFileLocked
({
url
:
this
.
openFile
.
url
}).
then
((
res
)
=>
{
if
(
res
.
data
)
{
return
this
.
$notify
({
return
this
.
$notify
({
title
:
'
正在下载该文件,请勿操作
'
,
title
:
'
文件已被锁定,暂时无法编辑
'
,
type
:
'
info
'
type
:
'
warning
'
})
})
}
}
else
{
this
.
openFile
=
item
this
.
visible
=
true
this
.
visible
=
true
this
.
$nextTick
(()
=>
{
this
.
reconnect
();
this
.
fileSocketTimer
=
setInterval
(()
=>
{
this
.
reconnect
();
},
15000
);
HttpReq
.
truckDispatching
.
downloadExcelOrFbx
({
url
:
item
.
url
,
type
:
this
.
query
.
type
}).
then
((
res
)
=>
{
HttpReq
.
truckDispatching
.
downloadExcelOrFbx
({
url
:
item
.
url
,
type
:
this
.
query
.
type
}).
then
((
res
)
=>
{
if
(
!
this
.
xs
){
if
(
!
this
.
xs
){
Spreadsheet
.
locale
(
'
zh-cn
'
);
Spreadsheet
.
locale
(
'
zh-cn
'
);
...
@@ -298,8 +323,12 @@ export default {
...
@@ -298,8 +323,12 @@ export default {
this
.
xs
.
loadData
(
this
.
stox
(
wb
))
this
.
xs
.
loadData
(
this
.
stox
(
wb
))
})
})
})
})
}
})
})
},
},
reconnect
()
{
HttpReq
.
truckDispatching
.
setFileValidityPeriod
({
url
:
this
.
openFile
.
url
}).
then
((
res
)
=>
{})
},
toDelete
(
item
)
{
toDelete
(
item
)
{
this
.
$confirm
(
`确认删除文件:
${
item
.
fileName
}
?`
,
'
提示
'
,
{
this
.
$confirm
(
`确认删除文件:
${
item
.
fileName
}
?`
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
confirmButtonText
:
'
确定
'
,
...
@@ -392,8 +421,17 @@ export default {
...
@@ -392,8 +421,17 @@ export default {
})
})
},
},
cancelForm
()
{
cancelForm
()
{
if
(
this
.
fileSocketTimer
)
{
HttpReq
.
truckDispatching
.
deleteFileEditingTags
({
url
:
this
.
openFile
.
url
}).
then
((
res
)
=>
{
clearInterval
(
this
.
fileSocketTimer
);
this
.
fileSocketTimer
=
null
;
})
}
this
.
visible
=
false
this
.
visible
=
false
this
.
uploadVisible
=
false
this
.
uploadVisible
=
false
this
.
logVisible
=
false
if
(
this
.
$refs
.
upload
)
{
if
(
this
.
$refs
.
upload
)
{
this
.
$refs
.
upload
.
clearFiles
()
this
.
$refs
.
upload
.
clearFiles
()
}
}
...
@@ -419,6 +457,12 @@ export default {
...
@@ -419,6 +457,12 @@ export default {
this
.
loadData
()
this
.
loadData
()
}
}
},
},
beforeDestroy
()
{
if
(
this
.
fileSocketTimer
)
{
clearInterval
(
this
.
fileSocketTimer
);
this
.
fileSocketTimer
=
null
;
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment