Commit 23bc210c authored by baiyanhao's avatar baiyanhao

审查页面相关代码提交

parent 7012f7f8
......@@ -14,7 +14,7 @@ export function listInnovation(query) {
}
export function listInnovationFinsh(query) {
return request({
url: '/review/scene/change/task/innovationBaseFindFinish',
url: '/review/scene/change/task/FindFinish',
method: 'post',
headers:{
'Content-Type': 'application/json',
......
......@@ -84,17 +84,7 @@ export function testInitatereviewAdd(query) {
data: query
})
}
// 发起评审页面 查询审查场景
export function testScene(query) {
return request({
url: '/review/scene/change/task/getSceneList',
method: 'post',
headers:{
'Content-Type': 'application/json',
},
data: query
})
}
// 发起评审页面 查询评审人员 不需要参数
export function testReviewer() {
return request({
......@@ -151,7 +141,7 @@ export function testDetailsListAll(query) {
})
}
// 发起评审页面 获取场景列表
export function testSceneListAll(query) {
export function testScene(query) {
return request({
url: '/review/scene/change/task/getSceneListAll',
method: 'post',
......
......@@ -83,7 +83,14 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' }
}
]
}
},
//去评审页面跳转 2024-9-5 16:25:29
{
path: '/goreview',
component: () => import('@/views/review/sceneReview/index'),
name: 'GoReview',
meta: { title: '去评审', icon: 'dashboard'}
},
]
// 动态路由,基于用户权限动态去加载
......
......@@ -232,7 +232,7 @@ export default {
keyword: ''
},
tableData: [],
listUrl: '/review/scene/change/task/innovationBaseFindFinish',
listUrl: '/review/scene/change/task/findFinish',
showSearch: true,
dialogManger: {
dialogVisible: false,
......
......@@ -516,7 +516,7 @@ export default {
this.newReviewSceneRemark = this.formModel.beizhuxinxi
this.newResDataAdd.newText = this.newReviewSceneText
this.newResDataAdd.newText = this.selectedDetailsSave.text
this.newResDataAdd.remark = this.newReviewSceneRemark
......
......@@ -552,13 +552,13 @@ export default {
// 按钮-选择审查场景
handleReSelectScene() {
testScene({ detailsId: this.newResDataAdd.detailsId })
.then(res => {
this.receivedScene = res
this.newResDataAdd.oldText = this.receivedScene.scene
this.dialogSceneDetails = true
.then(response => {
this.receivedScene = response
this.newResDataAdd.newText = this.receivedScene.scene
this.dialogVisibleScene = true
})
.catch(error => {
console.log('testDetails方法出错', error)
console.log('testReSelectScene方法出错', error)
})
},
// 按钮-确认发起
......@@ -623,7 +623,7 @@ export default {
selectedScene(newVal) {
this.selectedSceneSave = newVal
console.log('selectedSceneSave的新值', this.selectedSceneSave)
this.newResDataAdd.oldText = this.selectedSceneSave.text
// this.newResDataAdd.oldText = this.selectedSceneSave.text
}
}
}
......
......@@ -134,12 +134,18 @@
<el-col :span="18">
<el-form-item label="">
<div class="assessor-text">
<div
评审人员:<div
v-for="(reviewer, index) in this.receivedReviewer"
:key="index"
style="margin-bottom: 10px"
style="margin-bottom: 10px ;
display: flex;
position: relative;
flex-flow: row ;
"
>
{{ reviewer.dept.deptName }}:{{ reviewer.dept.leader }}
<span
style="position: absolute;"
>{{ reviewer.nickName }}({{ reviewer.dept.deptName }})</span>
</div>
</div>
</el-form-item>
......
......@@ -315,7 +315,7 @@ export default {
standard: '',
type: '',
keypointId: '',
keypointId:'',
keypoint: '',
detailsId: '',
details: '',
......@@ -480,11 +480,13 @@ export default {
)
testKeypoint({ standardId: this.newResDataAdd.standardId })
.then(response => {
console.log(response)
this.receivedkeypoints = response
//keypointId => /review/scene/change/task/getKeyPointList
//keypoint => /review/scene/change/task/getKeyPointList
this.newResDataAdd.keypointId = this.receivedkeypoints.keypointId
this.newResDataAdd.keypoint = this.receivedkeypoints.keypoint
this.newResDataAdd.keypointId = this.receivedkeypoints.data.keypointId
this.newResDataAdd.keypoint = this.receivedkeypoints.data.keypoint
this.dialogVisibleKeypoints = true
})
.catch(error => {
......
......@@ -342,7 +342,7 @@ export default {
/* 去评审按钮页面跳转*/
handleReview(row) {
this.$router.push({
path: `/review/reviewSceneReview`,
path: `/review/goreview`,
query: { id: row.id }
// params:{ },
})
......
......@@ -3,24 +3,26 @@
<div class="subtitle">评审对象</div>
<el-row :gutter="20" justify="center" type="flex">
<el-col :span="20">
<el-form label-suffix=":">
<el-form label-suffix=":" :data="this.resData">
<el-form-item label="条款分类" prop="type">
{{ typeList.find(item => item.dictValue === resData.type).dictLabel }}
<!-- {{
typeList.find(item => item.dictValue === resData.type).dictLabel
}} -->
</el-form-item>
<el-form-item label="标准条款" prop="chapter standard">
{{ resData.chapter }} {{ resData.standard }}
<!-- {{ resData.chapter }} {{ resData.standard }} -->
</el-form-item>
<el-form-item label="审查要点" prop="keypoint">
{{ resData.keypoint }}
<!-- {{ resData.keypoint }} -->
</el-form-item>
<el-form-item label="审查细则" prop="details">
{{ resData.details }}
<!-- {{ resData.details }} -->
</el-form-item>
<el-form-item label="新增场景" prop="newText" style="color: red">
{{ resData.newText }}
<!-- {{ resData.newText }} -->
</el-form-item>
<el-form-item label="备注信息" prop="remark" style="color: red">
{{ resData.remark }}
<!-- {{ resData.remark }} -->
</el-form-item>
</el-form>
</el-col>
......@@ -138,14 +140,16 @@ export default {
}
},
created() {
this.gainDictDataList();
this.gainDictDataList()
console.log('this.$route.query.id:', this.$route.query.id)
this.id = this.$route.query.id ? this.$route.query.id.toString() : '' // 确保 id 存在
if (this.id) {
reviewInnovation({ id: this.id }).then(response => {
reviewInnovation({ id: this.id })
.then(response => {
this.resData = response.data || {} // 确保数据存在
}).catch(error => {
})
.catch(error => {
console.error('Error loading review data:', error)
})
}
......@@ -164,28 +168,28 @@ export default {
this.typeList = response.data || []
})
},
// 字典格式化 operationSort 字段
formatOperationSort(row, column) {
const reviewTypeList = this.reviewTypeList.find(
item => item.dictValue === row.operationSort
)
return reviewTypeList ? reviewTypeList.dictLabel : ''
},
// 字典格式化 type 字段
formatType(row, column) {
const typeList = this.typeList.find(item => item.dictValue === row.type)
return typeList ? typeList.dictLabel : ''
},
// // 字典格式化 operationSort 字段
// formatOperationSort(row, column) {
// const reviewTypeList = this.reviewTypeList.find(
// item => item.dictValue === row.operationSort
// )
// return reviewTypeList ? reviewTypeList.dictLabel : ''
// },
// // 字典格式化 type 字段
// formatType(row, column) {
// const typeList = this.typeList.find(item => item.dictValue === row.type)
// return typeList ? typeList.dictLabel : ''
// },
handleSubmit() {
// 确保在提交时 auditModel 的所有字段都被正确设置
this.auditModel.taskId = this.id
this.auditModel.comment = this.model.deptName
console.log(this.auditModel, "即将发送的 auditModel 数据")
console.log(this.auditModel, '即将发送的 auditModel 数据')
submitInnovationAudit(this.auditModel)
submitInnovationAudit(this.auditModel)
.then(response => {
console.log('Audit submitted:', response)
this.$router.push({ path: '/review/wait' })
this.$router.push({ path: '/review/wait' })
})
.catch(error => {
console.error('Error submitting audit:', error)
......@@ -193,11 +197,10 @@ export default {
},
handleRadioChange(value) {
this.auditModel.passed = value === 'agree' ? 1 : 0
console.log(this.auditModel.passed, "Radio changed, passed value updated")
console.log(this.auditModel.passed, 'Radio changed, passed value updated')
}
}
}
}
</script>
<style lang="scss" scoped>
......
......@@ -13,20 +13,6 @@
size="small"
:inline="true"
>
<el-form-item prop="inspectStandardNo">
<el-select
v-model="queryParams.inspectStandardNo"
placeholder="检验标准"
clearable
>
<el-option
v-for="dict in dict.type.review_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="operationSort">
<el-select
v-model="queryParams.operationSort"
......@@ -92,14 +78,14 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="评审单编号"
sortable
min-width="200"
align="left"
prop="id"
>
</el-table-column> -->
</el-table-column>
<el-table-column
label="检验标准"
sortable
......@@ -165,7 +151,6 @@
>
<template slot-scope="scope">
<el-button
v-hasPermi="['review:already:detail']"
size="mini"
type="primary"
plain
......@@ -187,8 +172,8 @@
v-show="total > 0"
:total="total"
:background="false"
:page.sync="queryParams.page"
:limit.sync="queryParams.size"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination>
......@@ -230,8 +215,8 @@
<script>
import page from '@/mixins/page'
import dialog from './components/dialog.vue'
import { getDicts } from '../../../api/system/dict/data'
import { listInnovation } from '../../../api/innovation/innovation';
import { getDicts } from '@/api/system/dict/data'
import { listReviewer } from '../../../api/reviewer/reviewer'
export default {
components: {
'yan-dialog': dialog
......@@ -248,7 +233,7 @@ export default {
keyword: ''
},
tableData: [],
listUrl: '/review/scene/change/task/innovationBaseFindPending',
listUrl: '/review/scene/change/task/findPending',
showSearch: true,
dialogManger: {
dialogVisible: false,
......@@ -267,8 +252,9 @@ export default {
}
}
},
reviewTypeList:[],
typeList:[]
// request:'',
reviewTypeList: [],
typeList: []
}
},
watch: {
......@@ -279,48 +265,50 @@ export default {
}
}
},
created(){
created() {
this.gainDictDataList()
},
methods: {
//计算任务等待时间
formatWaitingTime(row){
const beginTime = new Date(row.taskBeginTime);//开始时间
const nowTime = new Date();//当前时间
const diffTime = nowTime - beginTime;//时间差
if(diffTime <= 0){
return '刚刚';
formatWaitingTime(row) {
const beginTime = new Date(row.taskBeginTime) //开始时间
const nowTime = new Date() //当前时间
const diffTime = nowTime - beginTime //时间差
if (diffTime <= 0) {
return '刚刚'
}
//显示精确到小时
const daysCount = Math.floor(diffTime/(24*3600*1000));
const hoursCount = Math.floor(diffTime/(3600*1000)) - daysCount*24;
if (daysCount > 0){
const daysCount = Math.floor(diffTime / (24 * 3600 * 1000))
const hoursCount = Math.floor(diffTime / (3600 * 1000)) - daysCount * 24
if (daysCount > 0) {
return `${daysCount}${hoursCount}小时前`
}else if (hoursCount > 0){
return `${hoursCount}小时前`
}else{
} else if (hoursCount > 0) {
return `${hoursCount}小时前`
} else {
return '一小时之内'
}
},
gainDictDataList(){
gainDictDataList() {
const obj = 'type'
const obj1= 'review_type'
const obj1 = 'review_type'
// 获取 review_type 字典数据
getDicts('review_type').then(response => {
this.reviewTypeList = response.data || []
})
getDicts('review_type').then(response => {
this.reviewTypeList = response.data || []
})
// 获取 type 字典数据
getDicts('type').then(response => {
this.typeList = response.data || []
})
// 获取 type 字典数据
getDicts('type').then(response => {
this.typeList = response.data || []
})
},
formatOperationSort(row,column) {
const reviewTypeList= this.reviewTypeList.find(item => item.dictValue === row.operationSort)
formatOperationSort(row, column) {
const reviewTypeList = this.reviewTypeList.find(
item => item.dictValue === row.operationSort
)
return reviewTypeList ? reviewTypeList.dictLabel : ''
},
formatType(row,column){
const typeList= this.typeList.find(item => item.dictValue === row.type)
formatType(row, column) {
const typeList = this.typeList.find(item => item.dictValue === row.type)
return typeList ? typeList.dictLabel : ''
},
/* 关闭移交弹窗-保存*/
......@@ -354,8 +342,8 @@ export default {
/* 去评审按钮页面跳转*/
handleReview(row) {
this.$router.push({
path: `/review/sceneReview`,
query: { id: row.id },
path: `/goreview`,
query: { id: row.id }
// params:{ },
})
},
......@@ -368,25 +356,31 @@ export default {
this.queryParams.page = 1
this.getList()
},
getList(){
getList() {
//打印参数
// console.log(this.queryParams)
// console.log(6666)
listInnovation(this.queryParams).then(response => {
this.tableData = response.rows
}).catch(error => {console.error("Error fetching data:", error)})
listReviewer(this.queryParams)
.then(response => {
this.tableData = response.rows
})
.catch(error => {
console.error('Error fetching data:', error)
})
},
/* 重置*/
resetQuery() {
this.queryParams.page = 1
this.queryParams.keyword = ''
this.queryParams.operationSort = ''
this.queryParams.type = ''
this.queryParams = {
pageNum: 1,
pageSize: 10,
operationSort: '',
type: '',
keyword: ''
}
this.handleQuery()
},
}
/* 数据字典转换*/
}
}
</script>
......
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