Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-collect
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyi.chen
data-collect
Commits
c4c7c925
Commit
c4c7c925
authored
Mar 21, 2024
by
wenyi.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
綫上
parent
19792d42
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
118 additions
and
178 deletions
+118
-178
.env
+3
-0
src/api/claimTasks/index.js
+8
-1
src/utils/getHost.js
+8
-0
src/views/auditManagement/admin/reviewed/index.vue
+1
-0
src/views/auditManagement/admin/unaudited/details.vue
+7
-10
src/views/auditManagement/admin/unaudited/index.vue
+1
-0
src/views/auditManagement/user/completed/details.vue
+2
-1
src/views/auditManagement/user/incomplete/details.vue
+2
-2
src/views/auditManagement/user/incomplete/index.vue
+1
-1
src/views/claimTasks/user/completed/details.vue
+3
-2
src/views/claimTasks/user/completed/index.vue
+1
-0
src/views/claimTasks/user/completed/modify.vue
+5
-2
src/views/claimTasks/user/incomplete/details.vue
+50
-102
src/views/claimTasks/user/list/index.vue
+2
-1
src/views/norm/list/details.vue
+18
-54
src/views/norm/list/dialog.vue
+3
-0
src/views/norm/list/edit.vue
+1
-0
vite.config.js
+2
-2
No files found.
.env
View file @
c4c7c925
...
...
@@ -7,5 +7,7 @@ VITE_OPEN = false
# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
VITE_PUBLIC_PATH = ./
Upload ='/dev/api/upload/picture'
# X-OPENAPI-TOKEN
VITE_X_OPENAPI_TOKEN = 098f6bcd4621d373cade4e832627b4f6
\ No newline at end of file
src/api/claimTasks/index.js
View file @
c4c7c925
...
...
@@ -37,7 +37,14 @@ export function claimTasksApi() {
},
normReceivesDetail
:
(
data
)
=>
{
return
request
({
url
:
'/api/normReceives/detail'
,
url
:
'/api/normCollects/detail'
,
method
:
'post'
,
data
,
});
},
normReceivesModify
:
(
data
)
=>
{
return
request
({
url
:
'/api/normCollects/modify'
,
method
:
'post'
,
data
,
});
...
...
src/utils/getHost.js
View file @
c4c7c925
...
...
@@ -5,3 +5,10 @@ export function getHost() {
return
'/data-collect-api'
}
}
export
function
getUploadUrl
()
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
'/dev/api/upload/picture'
}
else
{
return
'/data-collect-api/api/upload/picture'
}
}
\ No newline at end of file
src/views/auditManagement/admin/reviewed/index.vue
View file @
c4c7c925
...
...
@@ -98,6 +98,7 @@ const state = reactive({
name
:
''
,
status
:
'2,3'
,
task_id
:
''
,
admin
:
1
,
},
// 任务领取参数
apiAuditingParam
:
{
...
...
src/views/auditManagement/admin/unaudited/details.vue
View file @
c4c7c925
...
...
@@ -36,25 +36,22 @@
<el-form-item
label=
"标题"
:prop=
"'userFilled.' + index+ '.name'"
v-for=
"(item, index) in state.formItem.userFilled"
:key=
"index"
>
<el-row
style=
"width: 100% !important;"
>
<el-col
:span=
"
12
"
>
<el-col
:span=
"
7
"
>
<el-input
v-model=
"item.name"
placeholder=
"请输入标题"
clearabl
:disabled=
"true"
></el-input>
</el-col>
<el-col
:span=
"
6
"
>
<div>
是否必填:
</div>
<el-col
:span=
"
2
"
>
内容:
</el-col>
<el-col
:span=
"6"
>
<div>
<el-radio
v-model=
"item.radio"
label=
"1"
:disabled=
"true"
>
是
</el-radio>
<el-radio
v-model=
"item.radio"
label=
"0"
:disabled=
"true"
>
否
</el-radio>
</div>
<el-col
:span=
"15"
>
<el-input
v-model=
"item.value"
placeholder=
"请填写内容"
required
:disabled=
"true"
></el-input>
</el-col>
</el-row>
<el-row
style=
"width: 100% !important; margin-left: -8%; margin-top: 10 !important;"
>
<el-col
:span=
"2"
>
<div>
备注:
</div>
</el-col>
<el-col
:span=
"
18
"
>
<el-input
v-model=
"item.remarks"
placeholder=
"请输入备注(选填)"
clearabl
:disabled=
"true"
></el-input>
<el-col
:span=
"
22
"
>
<el-input
v-model=
"item.remarks"
placeholder=
"请输入备注(选填)"
clearabl
:disabled=
"true"
></el-input>
</el-col>
</el-row>
</el-form-item>
...
...
src/views/auditManagement/admin/unaudited/index.vue
View file @
c4c7c925
...
...
@@ -102,6 +102,7 @@ const state = reactive({
name
:
''
,
status
:
1
,
task_id
:
''
,
admin
:
1
,
},
// 任务领取参数
apiAuditingParam
:
{
...
...
src/views/auditManagement/user/completed/details.vue
View file @
c4c7c925
...
...
@@ -67,6 +67,7 @@ import '@wangeditor/editor/dist/css/style.css' // 引入 css
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-vue'
import
{
claimTasksApi
}
from
'/@/api/claimTasks'
import
{
ElMessage
}
from
'element-plus'
;
import
{
getUploadUrl
}
from
"/@/utils/getHost.js"
;
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'refresh'
]);
...
...
@@ -245,7 +246,7 @@ editorConfig.MENU_CONF['uploadImage'] = {
// 小于该值就插入 base64 格式(而不上传),默认为 0
base64LimitSize
:
5
*
1024
,
// 5kb
server
:
"dev/api/upload/picture"
,
server
:
getUploadUrl
()
,
fieldName
:
'file'
,
// 单个文件上传成功之后
onSuccess
(
file
,
res
)
{
// JS 语法
...
...
src/views/auditManagement/user/incomplete/details.vue
View file @
c4c7c925
...
...
@@ -65,7 +65,7 @@
<
script
setup
name=
"systemRoleDialog"
>
import
'@wangeditor/editor/dist/css/style.css'
// 引入 css
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-vue'
import
{
getUploadUrl
}
from
"/@/utils/getHost.js"
;
import
{
claimTasksApi
}
from
'/@/api/claimTasks'
import
{
ElMessage
}
from
'element-plus'
;
// 定义子组件向父组件传值/事件
...
...
@@ -129,7 +129,7 @@ editorConfig.MENU_CONF['uploadImage'] = {
// 小于该值就插入 base64 格式(而不上传),默认为 0
base64LimitSize
:
5
*
1024
,
// 5kb
server
:
"dev/api/upload/picture"
,
server
:
getUploadUrl
()
,
fieldName
:
'file'
,
// 单个文件上传成功之后
onSuccess
(
file
,
res
)
{
// JS 语法
...
...
src/views/auditManagement/user/incomplete/index.vue
View file @
c4c7c925
...
...
@@ -78,7 +78,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
import
{
Session
}
from
'/@/utils/storage'
;
// 引入组件
const
Breadcrumb
=
defineAsyncComponent
(()
=>
import
(
'/@/layout/navBars/breadcrumb/breadcrumb.vue'
));
const
DetailDialog
=
defineAsyncComponent
(()
=>
import
(
'
/@/views/claimTasks/user/incomplete/details
.vue'
));
const
DetailDialog
=
defineAsyncComponent
(()
=>
import
(
'
../../../claimTasks/user/incomplete/details-
.vue'
));
// 定义变量内容
const
DetailDialogRef
=
ref
()
...
...
src/views/claimTasks/user/completed/details.vue
View file @
c4c7c925
...
...
@@ -37,7 +37,7 @@
<el-input
v-model=
"item.name"
placeholder=
"请输入标题"
clearabl
:disabled=
"true"
></el-input>
</el-col>
<el-col
:span=
"2"
>
备注
:
内容
:
</el-col>
<el-col
:span=
"15"
>
<el-input
v-model=
"item.value"
placeholder=
"请填写内容"
required
:disabled=
"true"
></el-input>
...
...
@@ -90,6 +90,7 @@ import '@wangeditor/editor/dist/css/style.css' // 引入 css
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-vue'
import
{
claimTasksApi
}
from
'/@/api/claimTasks'
import
{
ElMessage
}
from
'element-plus'
;
import
{
getUploadUrl
}
from
"/@/utils/getHost.js"
;
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'refresh'
]);
...
...
@@ -269,7 +270,7 @@ editorConfig.MENU_CONF['uploadImage'] = {
// 小于该值就插入 base64 格式(而不上传),默认为 0
base64LimitSize
:
5
*
1024
,
// 5kb
server
:
"dev/api/upload/picture"
,
server
:
getUploadUrl
()
,
fieldName
:
'file'
,
// 单个文件上传成功之后
onSuccess
(
file
,
res
)
{
// JS 语法
...
...
src/views/claimTasks/user/completed/index.vue
View file @
c4c7c925
...
...
@@ -101,6 +101,7 @@ const state = reactive({
name
:
''
,
status
:
'1,2,3'
,
task_id
:
''
,
order
:
'asc'
},
// 任务领取参数
apiReceiveParam
:
{
...
...
src/views/claimTasks/user/completed/modify.vue
View file @
c4c7c925
...
...
@@ -67,6 +67,7 @@ import '@wangeditor/editor/dist/css/style.css' // 引入 css
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-vue'
import
{
claimTasksApi
}
from
'/@/api/claimTasks'
import
{
ElMessage
}
from
'element-plus'
;
import
{
getUploadUrl
}
from
"/@/utils/getHost.js"
;
// 定义子组件向父组件传值/事件
const
emit
=
defineEmits
([
'refresh'
]);
...
...
@@ -192,12 +193,14 @@ const onSubmit = () => {
ElMessage
.
error
(
'只允许上传两张图片!'
);
}
if
(
apiIndex
==
1
&&
valid
){
claimTasksApi
().
normCollectsAdd
(
JSON
.
stringify
(
state
.
formItem
)).
then
(
res
=>
{
claimTasksApi
().
normReceivesModify
(
JSON
.
stringify
(
state
.
formItem
)).
then
(
res
=>
{
editor
.
clear
()
state
.
btnLoading
=
false
ElMessage
.
success
(
'操作成功'
);
closeDialog
();
emit
(
'refresh'
);
}).
catch
(()
=>
{
editor
.
clear
()
state
.
btnLoading
=
false
closeDialog
();
emit
(
'refresh'
);
...
...
@@ -247,7 +250,7 @@ editorConfig.MENU_CONF['uploadImage'] = {
// 小于该值就插入 base64 格式(而不上传),默认为 0
base64LimitSize
:
5
*
1024
,
// 5kb
server
:
"dev/api/upload/picture"
,
server
:
getUploadUrl
()
,
fieldName
:
'file'
,
// 单个文件上传成功之后
onSuccess
(
file
,
res
)
{
// JS 语法
...
...
src/views/claimTasks/user/incomplete/details.vue
View file @
c4c7c925
This diff is collapsed.
Click to expand it.
src/views/claimTasks/user/list/index.vue
View file @
c4c7c925
...
...
@@ -20,7 +20,7 @@
<el-table
:data=
"state.tableData.data"
border
style=
"width: 100%"
:height=
"state.tableHeight"
ref=
"multipleTableRef"
@
selection-change=
"tableSelection"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
label=
"序号"
prop=
"id"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
label=
"序号"
type=
"index"
width=
"100"
show-overflow-tooltip
align=
"center"
></el-table-column>
<el-table-column
prop=
"taskPackageInfo.name"
label=
"任务名称"
show-overflow-tooltip
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"指标名称"
show-overflow-tooltip
align=
"center"
>
...
...
@@ -88,6 +88,7 @@ const state = reactive({
page
:
1
,
limit
:
10
,
name
:
''
,
receives
:
1
,
},
// 任务领取参数
apiReceiveParam
:
{
...
...
src/views/norm/list/details.vue
View file @
c4c7c925
<
template
>
<div
class=
"system-role-dialog-container"
>
<el-dialog
:title=
"state.dialog.title"
v-model=
"state.dialog.isShowDialog"
width=
"
4
0%"
@
close=
"closeDialog"
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"state.dialog.title"
v-model=
"state.dialog.isShowDialog"
width=
"
6
0%"
@
close=
"closeDialog"
:close-on-click-modal=
"false"
>
<el-form
ref=
"dialogFormRef"
:model=
"state.formItem.addItem"
:rules=
"state.rules"
size=
"default"
label-width=
"100px"
v-loading=
"state.dataLoading"
label-position=
"right"
style=
"width: 90%;text-align: center;"
>
<el-form-item
label=
"指标名称"
prop=
"name"
>
...
...
@@ -62,20 +62,18 @@
</el-form-item>
</el-form>
<el-divider
style=
"width: 90%;"
><span
style=
"color: #F56C6C;"
>
用户已领取列表
</span></el-divider>
<el-table
:data=
"state.tableData"
border
style=
"width:
9
0%"
:height=
"state.tableHeight"
<el-table
:data=
"state.tableData"
border
style=
"width:
10
0%"
:height=
"state.tableHeight"
ref=
"multipleTableRef"
>
<el-table-column
v-for=
"column in state.columns"
:key=
"column.prop"
:label=
"column.label"
:prop=
"column.prop"
></el-table-column>
</el-table>
<el-divider
style=
"width: 90%;"
><span
style=
"color: #F56C6C;"
>
已完成的列表
</span></el-divider>
<el-table
:data=
"state.collectsTableData"
border
style=
"width: 90%"
:height=
"state.tableHeight"
ref=
"multipleTableRefs"
>
<el-table-column
v-for=
"column in state.collectsColumns"
:key=
"column.prop"
:label=
"column.label"
:prop=
"column.prop"
></el-table-column>
</el-table>
<template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"closeDialog()"
size=
"default"
>
取 消
</el-button>
</span>
<el-table-column
v-for=
"column in state.columns"
:key=
"column.prop"
:label=
"column.label"
:prop=
"column.prop"
show-overflow-tooltip
align=
"center"
>
<template
#
default=
"scope"
>
<span
style=
"color:#409EFF"
v-if=
"column.label =='用户名称'"
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
<span
style=
"color:#909399"
v-else-if=
"column.label =='领取状态' && scope.row[column.prop] ==1"
>
已领取
</span>
<span
style=
"color:#E6A23C"
v-else-if=
"column.label =='完成状态' && scope.row[column.prop] ==0"
>
未完成
</span>
<span
style=
"color:#409EFF"
v-else-if=
"column.label =='完成状态' && scope.row[column.prop] ==1"
>
已完成
</span>
<span
v-else
>
{{
scope
.
row
[
column
.
prop
]
}}
</span>
</
template
>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
...
...
@@ -187,8 +185,8 @@ const openDialog = (norm_id) => {
if
(
receivesList
){
let
arr
=
[
{
label
:
'序号'
,
prop
:
'index'
},
{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'用户名称'
,
prop
:
'userInfo.name'
},
//
{ label:'ID', prop: 'id'},
{
label
:
'用户名称'
,
prop
:
'userInfo.name'
,
},
{
label
:
'任务名称'
,
prop
:
'task_info.name'
},
{
label
:
'指标名称'
,
prop
:
'norm_list_info.name'
},
];
...
...
@@ -196,10 +194,12 @@ const openDialog = (norm_id) => {
receivesList
.
forEach
(
function
(
item
,
index
,
arr
)
{
let
list
=
{
'index'
:
index
+
1
,
'id'
:
item
.
id
,
//
'id':item.id,
'userInfo.name'
:
item
.
userInfo
.
name
,
'task_info.name'
:
item
.
task_info
.
name
,
'norm_list_info.name'
:
item
.
norm_list_info
.
name
,
'receives_status'
:
item
.
receives_status
,
'completion_status'
:
item
.
completion_status
,
}
state
.
tableData
.
push
(
list
);
item
.
norm_list_extend
.
forEach
(
function
(
items
,
indexs
,
arrs
)
{
...
...
@@ -216,44 +216,8 @@ const openDialog = (norm_id) => {
list
[
'extend_value'
+
indexs
]
=
items
.
extend_value
;
});
});
}
//完成列表
let
collectsList
=
res
.
data
.
collectsList
if
(
collectsList
){
let
arr
=
[
{
label
:
'序号'
,
prop
:
'index'
},
{
label
:
'ID'
,
prop
:
'id'
},
{
label
:
'用户名称'
,
prop
:
'userInfo.name'
},
{
label
:
'任务名称'
,
prop
:
'task_info.name'
},
{
label
:
'指标名称'
,
prop
:
'norm_list_info.name'
},
];
state
.
collectsColumns
=
arr
;
collectsList
.
forEach
(
function
(
item
,
index
,
arr
)
{
console
.
log
(
item
)
console
.
log
(
111
)
let
list
=
{
'index'
:
index
+
1
,
'id'
:
item
.
id
,
'userInfo.name'
:
item
.
userInfo
.
name
,
'task_info.name'
:
item
.
task_info
.
name
,
'norm_list_info.name'
:
item
.
norm_list_info
.
name
,
}
state
.
collectsTableData
.
push
(
list
);
item
.
norm_list_extend
.
forEach
(
function
(
items
,
indexs
,
arrs
)
{
if
(
state
.
collectsColumns
.
length
>
0
){
state
.
collectsColumns
.
forEach
(
function
(
itemss
,
indexss
,
arrss
)
{
let
vlues
=
state
.
collectsColumns
.
map
(
itemsss
=>
itemsss
.
prop
).
indexOf
(
'extend_value'
+
indexs
)
if
(
vlues
==
-
1
){
state
.
collectsColumns
.
push
(
{
label
:
items
.
extend_name
,
prop
:
'extend_value'
+
indexs
})
}
});
}
else
{
state
.
collectsColumns
.
push
(
{
label
:
items
.
extend_name
,
prop
:
'extend_value'
+
indexs
})
}
list
[
'extend_value'
+
indexs
]
=
items
.
extend_value
;
});
});
state
.
columns
.
push
(
{
label
:
'领取状态'
,
prop
:
'receives_status'
})
state
.
columns
.
push
(
{
label
:
'完成状态'
,
prop
:
'completion_status'
})
}
}).
catch
(()
=>
{
...
...
src/views/norm/list/dialog.vue
View file @
c4c7c925
...
...
@@ -162,6 +162,7 @@ const userAddItem= (length) => {
state
.
formItem
.
userFilled
.
push
({
name
:
''
,
radio
:
'1'
,
remarks
:
''
,
})
state
.
userIndex
++
};
...
...
@@ -190,6 +191,7 @@ const closeDialog = () => {
// 获取最后发布的信息
const
finalData
=
()
=>
{
normApi
().
finalData
({}).
then
(
res
=>
{
if
(
res
.
data
.
id
){
state
.
apiData
.
id
=
res
.
data
.
id
;
normApi
().
normDetail
(
state
.
apiData
).
then
(
res
=>
{
let
addItem
=
res
.
data
.
addItem
;
...
...
@@ -215,6 +217,7 @@ const finalData = () => {
}).
catch
(()
=>
{
})
}
}).
catch
(()
=>
{
})
...
...
src/views/norm/list/edit.vue
View file @
c4c7c925
...
...
@@ -202,6 +202,7 @@ const userAddItem= (length) => {
state
.
formItem
.
userFilled
.
push
({
name
:
''
,
radio
:
'1'
,
remarks
:
''
,
})
state
.
userIndex
++
};
...
...
vite.config.js
View file @
c4c7c925
...
...
@@ -37,8 +37,8 @@ const viteConfig = defineConfig((mode) => {
hmr
:
true
,
proxy
:
{
'/dev'
:
{
//
target: 'https://data-collect.raisound.com/smart-detection',
target
:
'http://192.168.10.168/data-collect-api'
,
target
:
'https://data-collect.raisound.com/smart-detection'
,
//
target: 'http://192.168.10.168/data-collect-api',
ws
:
true
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
dev/
,
''
),
...
...
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