Commit 7535a9a7 authored by jiaxu.yan's avatar jiaxu.yan

feat(填写调查问卷): 填写调查问卷对接接口

parent 4d14fce1
import request from '@/utils/request'
// 获取任务详情
export function taskDetail(data) {
return request({
url: '/system/review/task/view',
method: 'post',
data
})
}
export function reviewDetailsSubmit(data) {
return request({
url: '/review/details/result/save',
method: 'post',
data
})
}
// 提交审查问卷
export function taskSubmit(data) {
return request({
url: '/system/review/task/submit',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
data() { data() {
return { return {
pageType: '1', pageType: '1',
listUrl: '/finishTasklist', listUrl: '/system/review/task/findInFinish',
showSearch: true, showSearch: true,
tableData: [] tableData: []
} }
......
...@@ -70,26 +70,26 @@ ...@@ -70,26 +70,26 @@
开始时间 开始时间
</div> </div>
<div class="cell-value"> <div class="cell-value">
{{ item.startTime ? item.startTime : '---' }} {{ item.taskBeginTime ? parseTime(item.taskBeginTime) : '---' }}
</div> </div>
</div> </div>
<div class="card-cell"> <div class="card-cell">
<div class="cell-lable">任务编号</div> <div class="cell-lable">任务编号</div>
<div class="cell-value"> <div class="cell-value">
{{ item.missionNo ? item.missionNo : '---' }} {{ item.taskNo ? item.taskNo : '---' }}
</div> </div>
</div> </div>
<div class="card-cell"> <div class="card-cell">
<div class="cell-lable">任务名称</div> <div class="cell-lable">任务名称</div>
<div class="cell-value"> <div class="cell-value">
{{ item.tit ? item.tit : '---' }} {{ item.name ? item.name : '---' }}
</div> </div>
</div> </div>
<div class="card-cell"> <div class="card-cell">
<div class="cell-lable">任务组长</div> <div class="cell-lable">任务组长</div>
<div class="cell-value"> <div class="cell-value">
<i class="el-icon-user"></i> <i class="el-icon-user"></i>
{{ item.owener ? item.owener : '---' }} {{ item.leader ? item.leader : '---' }}
</div> </div>
</div> </div>
<div v-if="!isSysReview" class="card-cell"> <div v-if="!isSysReview" class="card-cell">
...@@ -154,9 +154,9 @@ ...@@ -154,9 +154,9 @@
</div> </div>
<div v-if="isSysReview" class="card-cell"> <div v-if="isSysReview" class="card-cell">
<div class="cell-lable">任务状态</div> <div class="cell-lable">任务状态</div>
<div v-if="item.costTime === 0" class="cell-value">● 未开始</div> <div v-if="item.taskStatus === 'NEW'" class="cell-value">● 未开始</div>
<div v-else class="cell-value yellow"> <div v-if="item.taskStatus === 'PENDING'" class="cell-value yellow">
● 已耗时({{ item.costTime }}小时) ● 已耗时({{ getHourDiff(item.taskBeginTime) }}小时)
</div> </div>
</div> </div>
<div v-if="isSysReview" class="card-cell"> <div v-if="isSysReview" class="card-cell">
...@@ -165,16 +165,13 @@ ...@@ -165,16 +165,13 @@
<el-link <el-link
v-if="item.progress === 0" v-if="item.progress === 0"
type="primary" type="primary"
@click="handleReviewForm" @click="handleReviewForm(item.id)"
>查看检查表单</el-link >查看检查表单</el-link
> ><br />
<el-link <el-link type="primary" @click="handleReviewQuestionnaire(item.id)"
v-else-if="item.progress < 90" >填写检查表单</el-link
type="primary" ><br />
@click="handleReviewQuestionnaire" <el-link type="primary" @click="handleConfirmFindings(item.id)"
>填写审查问卷</el-link
>
<el-link v-else type="primary" @click="handleConfirmFindings"
>确认审查结果</el-link >确认审查结果</el-link
> >
</div> </div>
...@@ -195,6 +192,7 @@ ...@@ -195,6 +192,7 @@
icon="el-icon-arrow-right" icon="el-icon-arrow-right"
circle circle
title="任务详情" title="任务详情"
@click="goDetail(item.id)"
></el-button> ></el-button>
<el-button <el-button
type="warning" type="warning"
...@@ -228,11 +226,12 @@ ...@@ -228,11 +226,12 @@
@click="handleFileLibrary(item)" @click="handleFileLibrary(item)"
></el-button> ></el-button>
<el-button <el-button
v-if="item.progress === 0" v-if="item.taskStatus === 'NEW'"
type="danger" type="danger"
icon="el-icon-video-play" icon="el-icon-video-play"
circle circle
title="开始" title="开始"
@click="startTask(item)"
></el-button> ></el-button>
</div> </div>
</div> </div>
...@@ -255,6 +254,7 @@ ...@@ -255,6 +254,7 @@
<script> <script>
import page from '@/mixins/page' import page from '@/mixins/page'
import taskDialog from './components/dialog' import taskDialog from './components/dialog'
import request from '@/utils/request'
export default { export default {
dicts: ['sys_job_status', 'sys_scene_type', 'task_type'], dicts: ['sys_job_status', 'sys_scene_type', 'task_type'],
components: { taskDialog }, components: { taskDialog },
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
}, },
dialogVisible: false, dialogVisible: false,
pageType: '1', // 代办任务类型 1-体系审查 其他-车型测评 pageType: '1', // 代办任务类型 1-体系审查 其他-车型测评
listUrl: '/tasklist', listUrl: '/system/review/task/findInProcess',
showSearch: true, showSearch: true,
tableData: [] tableData: []
} }
...@@ -307,6 +307,24 @@ export default { ...@@ -307,6 +307,24 @@ export default {
path: '/processing/fileLibrary' path: '/processing/fileLibrary'
}) })
}, },
startTask(item) {
request({
url: '/system/review/task/start',
method: 'post',
data: {
taskId: item.id
}
}).then(res => {
console.log(res)
this.loadData()
})
},
goDetail(id) {
this.$router.push({
path: '/task/task-detail?id=' + id
})
},
closeDialog() { closeDialog() {
this.dialogVisible = false this.dialogVisible = false
}, },
...@@ -320,9 +338,9 @@ export default { ...@@ -320,9 +338,9 @@ export default {
path: '/processing/reviewReport' path: '/processing/reviewReport'
}) })
}, },
handleReviewQuestionnaire() { handleReviewQuestionnaire(id) {
this.$router.push({ this.$router.push({
path: '/processing/write-check-form' path: '/processing/write-check-form?id=' + id
}) })
}, },
handleReviewForm() { handleReviewForm() {
...@@ -337,9 +355,9 @@ export default { ...@@ -337,9 +355,9 @@ export default {
path: '/processing/review-form' path: '/processing/review-form'
}) })
}, },
handleConfirmFindings() { handleConfirmFindings(id) {
this.$router.push({ this.$router.push({
path: '/processing/confirm-result' path: '/processing/confirm-result?id=' + id
}) })
}, },
handleTaskContent(msg) { handleTaskContent(msg) {
...@@ -348,6 +366,19 @@ export default { ...@@ -348,6 +366,19 @@ export default {
path: '/processing/vehicle-type' path: '/processing/vehicle-type'
}) })
} }
},
getHourDiff(time) {
// 获取当前时间
var now = new Date()
// 设置目标时间(这里为2021年9月30日)
var targetTime = new Date(time) // 注意月份从0开始计数,所以8表示九月
// 计算时间差(单位为毫秒)
var timeDiff = Math.abs(targetTime - now)
// 将时间差转换成小时
return Math.floor(timeDiff / (60 * 60 * 1000))
} }
} }
} }
...@@ -363,19 +394,24 @@ export default { ...@@ -363,19 +394,24 @@ export default {
flex-wrap: nowrap; flex-wrap: nowrap;
min-width: 111px; min-width: 111px;
} }
.status-multiple-cell { .status-multiple-cell {
width: 150px; width: 150px;
} }
.option-cell { .option-cell {
width: 240px; width: 240px;
} }
.box-card { .box-card {
margin-bottom: 15px; margin-bottom: 15px;
font-size: 14px; font-size: 14px;
::v-deep .el-card__body { ::v-deep .el-card__body {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
::v-deep .el-link.is-underline::after { ::v-deep .el-link.is-underline::after {
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -385,20 +421,25 @@ export default { ...@@ -385,20 +421,25 @@ export default {
border-bottom: 1px solid #1890ff; border-bottom: 1px solid #1890ff;
content: ''; content: '';
} }
.cell-progress { .cell-progress {
width: 200px; width: 200px;
} }
.cell-lable { .cell-lable {
color: #515a6e; color: #515a6e;
font-size: 13px; font-size: 13px;
} }
.cell-value { .cell-value {
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
} }
.cell-value.yellow { .cell-value.yellow {
color: #fea623; color: #fea623;
} }
.cell-value.green { .cell-value.green {
color: #19be6b; color: #19be6b;
} }
......
<template>
<el-dialog
title="新增场景对话框"
:visible.sync="dialogManger.dialogVisible"
width="35%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="handleSceneClose"
>
<div class="file-prompt">
<div>
<i
class="el-icon-info"
/>新增场景,需要组织评审,评审通过后新增场景自动进入场景库。
</div>
</div>
<el-form
ref="sceneForm"
:model="sceneForm"
:rules="sceneRules"
label-width="80px"
class="scene-form"
>
<el-form-item label="评审类型" prop="reviewType">
<!-- 下拉框 -->
<el-select
v-model="sceneForm.reviewType"
placeholder="请选择评审类型"
style="width: 100%"
>
<el-option
v-for="item in reviewTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="场景分类" prop="sceneClassification">
<el-select
v-model="sceneForm.sceneClassification"
placeholder="请选择评审类型"
style="width: 100%"
>
<el-option
v-for="item in reviewTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="场景内容" prop="sceneContent">
<el-input
v-model="sceneForm.sceneContent"
maxlength="100"
show-word-limit
type="textarea"
/>
</el-form-item>
<el-form-item label="评审人员" prop="assessor">
<div>组长-xxx</div>
<div>组员-xxx、xxx、xxx</div>
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input
v-model="sceneForm.remark"
maxlength="100"
show-word-limit
type="textarea"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handleSceneClose()">取 消</el-button>
<el-button type="primary" @click="handleSaveNewScene()">
确 定
</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
dicts: ['file_status'],
props: {
dialogManger: {
type: Object,
default() {
return {
dialogVisible: false
}
}
}
},
data() {
return {
sceneForm: {},
sceneRules: {
reviewType: [
{ required: true, message: '请选择评审类型', trigger: 'change' }
],
sceneClassification: [
{ required: true, message: '请选择场景分类', trigger: 'change' }
],
sceneContent: [
{ required: true, message: '请输入场景内容', trigger: 'blur' }
]
},
reviewTypeOptions: []
}
},
methods: {
// 新增场景对话框关闭时触发的回调函数
handleSceneClose() {
this.dialogManger.dialogVisible = false
this.$refs.sceneForm.resetFields()
},
/**
* 保存新场景
*/
handleSaveNewScene() {
// vue表单校验vue表单校验
this.$refs.sceneForm.validate(valid => {
if (valid) {
this.handleSceneClose()
}
})
}
}
}
</script>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="任务编码" prop="status"> <el-form-item label="任务编码" prop="status">
<el-input v-model="model.status" placeholder="请输入" clearable /> <el-input v-model="model.taskNo" placeholder="请输入" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -237,6 +237,7 @@ ...@@ -237,6 +237,7 @@
</template> </template>
<script> <script>
import image from '@/assets/images/login-background.jpg' import image from '@/assets/images/login-background.jpg'
import request from '@/utils/request'
export default { export default {
data() { data() {
return { return {
...@@ -256,8 +257,23 @@ export default { ...@@ -256,8 +257,23 @@ export default {
} }
} }
}, },
mounted() {
this.getTask(this.$route.query.id)
console.log(this.$route.query.id)
},
dicts: ['sys_task_status', 'sys_pro'], dicts: ['sys_task_status', 'sys_pro'],
methods: { methods: {
getTask(id) {
request({
url: '/system/review/task/view',
method: 'post',
data: {
taskId: id
}
}).then(res => {
console.log(res)
})
},
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw) this.imageUrl = URL.createObjectURL(file.raw)
}, },
......
...@@ -314,6 +314,7 @@ ...@@ -314,6 +314,7 @@
</page-standard> </page-standard>
</template> </template>
<script> <script>
import { taskDetail } from '@/api/task/task'
export default { export default {
dicts: ['sys_task_status', 'sys_pro'], dicts: ['sys_task_status', 'sys_pro'],
data() { data() {
...@@ -323,30 +324,8 @@ export default { ...@@ -323,30 +324,8 @@ export default {
formType: 1, formType: 1,
/* 表单对象*/ /* 表单对象*/
model: { model: {
no: '12345', systemReviewTask: {},
status: '资产审查任务', reviewSceneChangeTasks: {}
taskStatus: '1',
pname: '广汽丰田',
carType: '油车',
weituo: '广汽丰田汽车有限公司',
weituoAddress: '广州市南沙区黄阁镇市南大道8号',
phonenumber: '15320986678',
youzheng: '233546',
type: '小型车',
shibie: 'ZGH6788',
yangpin: '全新第四代汉兰达',
shengchan: '广汽丰田汽车有限公司',
songyangzhe: '赵平',
songyangdata: '2023-08-05',
shangbiao: 'ZGH6788',
shuliang: '200',
riqi: '2022-12-23',
yijv: 'ZGH6788',
jianyan: '广汽丰田汽车有限公司',
qianfa: '2023-11-02',
bianhao: '91440101717852200L',
jielun:
'广汽丰田汽车有限公司(GAC TOYOTA),成立于2004年9月1日,由广汽集团股份有限公司与日本丰田汽车公司各出资50%组建,合作期限30年,注册资本16.92亿元。 公司位于中国极具活力的珠三角的几何中心--广州南沙区,占地面积187万平方米,建筑面积40万平方米,起步产能20万辆/年。共有员工5500余人,其中大专及其以上学历者达24.9%,平均年龄为26岁。'
}, },
loading: false, loading: false,
/* 表格对象*/ /* 表格对象*/
...@@ -463,7 +442,20 @@ export default { ...@@ -463,7 +442,20 @@ export default {
] ]
} }
}, },
mounted() {
this.getTask(this.$route.query.id)
console.log(this.$route.query.id)
},
methods: { methods: {
getTask(id) {
taskDetail({
taskId: id
}).then(res => {
if (res.code === 200) {
this.model = res.data
}
})
},
/** /**
* 小组信息修改 * 小组信息修改
* @param row 行内信息 * @param row 行内信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment