fix:测试问题修改

dev_1.0.0
xiangcongshuai 8 months ago
parent e122081b82
commit 0a4f5ba630

@ -96,11 +96,11 @@ export function queryCaseDetails(data) {
})
}
/** 获取案件指标详情 */
export function queryIndexDetail(data, page, size) {
export function queryIndexDetail(data) {
return request({
url: `${routes.modelCase}/getIndexDetail?page=${page}&size=${size}`,
url: `${routes.modelCase}/getIndexDetail`,
method: 'post',
params: data
data
})
}
/** 查询证据列表 */

@ -10,7 +10,7 @@ import routes from '../gateway-routes'
/** 查看指标规则列表 */
export function queryIndexData(data, page, size) {
return request({
url: `${routes.modelIndex}/selectAll?page=${page}&size=${size}`,
url: `${routes.modelIndex}/selectAll`,
method: 'post',
data
})

@ -218,8 +218,10 @@ export default {
//
getIndexData(val) {
queryIndexData({
indexType: val
}, 1, 999).then(res => {
indexType: val,
page: 1,
size: 9999
}).then(res => {
this.questionlist = res.data.result
})
},

@ -5,7 +5,7 @@ const network = {
// 默认的接口地址 如果是开发环境和生产环境走vab-mock-server当然你也可以选择自己配置成需要的接口地址
baseURL:
process.env.NODE_ENV === 'development'
? 'http://192.168.10.137:8097/fu-hsi-server'
? 'http://192.168.10.25:8097/fu-hsi-server'
: '/fuHsiApi',
// 配后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
contentType: 'application/json;charset=UTF-8',

@ -18,6 +18,7 @@ const state = () => ({
unitLevel: null,
endTime: null,
avatar: null,
adminFlag: '',
permissions: []
})
const getters = {
@ -29,6 +30,7 @@ const getters = {
cardId: (state) => state.cardId,
userId: (state) => state.userId,
unitId: (state) => state.unitId,
adminFlag: (state) => state.adminFlag,
permissions: (state) => state.permissions
}
const mutations = {
@ -48,6 +50,9 @@ const mutations = {
setUsername(state, username) {
state.username = username
},
setAdminFlag(state, adminFlag) {
state.adminFlag = adminFlag
},
setName(state, name) {
state.name = name
},
@ -107,10 +112,11 @@ const actions = {
}
console.log(data, 'userData')
const { permission, userName, headPicId } = data
const { permission, userName, headPicId, adminFlag } = data
if (userName) {
commit('setUsername', userName)
commit('setAdminFlag', adminFlag)
commit('setAvatar', headPicId)
commit('setPermissions', permission.length > 0 ? permission : ['p_home'])
return permission

@ -8,10 +8,24 @@
<template>
<div class="common-content">
<el-input v-model="indexName" placeholder="指标名称" clearable style="width: 200px" />
<el-select v-model="indexResult" style="margin-left: 16px;" clearable placeholder="请选择指标结果">
<el-option v-for="item in indexResultOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<el-select v-model="indexHasRecord" style="margin-left: 16px;" clearable placeholder="请选择笔录结果">
<el-option label="有笔录" :value="true" />
<el-option label="无笔录" :value="false" />
</el-select>
<el-select v-model="indexSource" style="margin-left: 16px;" clearable placeholder="请选择数据来源">
<el-option v-for="item in indexSourceList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="atomicName" placeholder="原子指标名称" clearable style="width: 200px;margin-left: 16px;" />
<vxe-grid v-bind="gridOptions" style="margin-top: 10px">
<template #opera="{row}">
<el-button type="text" icon="el-icon-check" @click="handelStart(row)" />
<el-button type="text" icon="el-icon-close" @click="handleDel(row)" />
<template #operate="{row}">
<div class="btn-item">
<span>{{ row.record }}</span>
<span v-if="row.recordSegmentationList && row.recordSegmentationList.length > 0">【<el-button type="text" @click="handleDetails(row)"></el-button></span>
</div>
</template>
<template #result="{row}">
<div v-if="row.newFlag" style="padding: 10px 0;">
@ -30,16 +44,21 @@
@pagination="fetchData"
/>
</div>
<record-details ref="details" />
</div>
</template>
<script>
import mixin from '@/views/mixin'
import { queryIndexDetail } from '@/api/caseDetails'
import { debounce } from '@/utils'
import RecordDetails from './RecordDetails.vue'
export default {
name: 'CommonIndex',
mixins: [mixin],
components: {
RecordDetails
},
props: {
//
isEdit: {
@ -54,20 +73,30 @@ export default {
},
data() {
return {
indexResultOptions: [{
name: '未评估',
id: '0'
}, {
name: '符合',
id: '1'
}, {
name: '不符合',
id: '2'
}],
gridOptions: {
...mixin.data().gridOptions,
treeConfig: {},
columns: [
{ title: '', width: '50px', treeNode: true },
{ title: '序号', type: 'seq', width: '50px' },
{ title: '分析结果', width: '200px', field: 'indexResult', slots: { default: 'result' }},
{ title: '指标名称', field: 'indexName', align: 'left' },
{ title: '分值', field: 'score', width: '50px' },
{ title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} },
{ title: '笔录结果', field: 'record' }
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' },
// { title: '', field: 'startTime' },
@ -75,6 +104,11 @@ export default {
],
data: []
},
indexName: '',
indexResult: '',
indexSource: '',
indexHasRecord: undefined,
atomicName: '',
indexSourceList: JSON.parse(sessionStorage.getItem('index_source'))
}
},
@ -86,19 +120,51 @@ export default {
}
},
immediate: true
},
indexName: function() {
this.debounceSearch(this)
},
indexResult: function() {
this.debounceSearch(this)
},
indexHasRecord: function() {
this.debounceSearch(this)
},
atomicName: function() {
this.debounceSearch(this)
},
indexSource: function() {
this.debounceSearch(this)
}
},
mounted() {
this.fetchData()
},
methods: {
//
debounceSearch: debounce((_this) => {
_this.fetchData()
}),
//
fetchData() {
queryIndexDetail({ caseId: this.$route.params['id'], indexType: '1' }, this.queryForm.page, this.queryForm.size).then(res => {
const params = { caseId: this.$route.params['id'],
indexType: '1',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName,
indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName,
indexSource: this.indexSource
}
queryIndexDetail(params).then(res => {
this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total
})
},
handleDetails(row) {
this.$refs.details.show(row.recordSegmentationList)
},
//
handelStart(row) {
@ -114,5 +180,11 @@ export default {
</script>
<style lang="scss" scoped>
.common-content {
.btn-item {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

@ -8,10 +8,24 @@
<template>
<div class="incriminate-content">
<el-input v-model="indexName" placeholder="指标名称" clearable style="width: 200px" />
<el-select v-model="indexResult" style="margin-left: 16px;" clearable placeholder="请选择指标结果">
<el-option v-for="item in indexResultOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<el-select v-model="indexHasRecord" style="margin-left: 16px;" clearable placeholder="请选择笔录结果">
<el-option label="有笔录" :value="true" />
<el-option label="无笔录" :value="false" />
</el-select>
<el-select v-model="indexSource" style="margin-left: 16px;" clearable placeholder="请选择数据来源">
<el-option v-for="item in indexSourceList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="atomicName" placeholder="原子指标名称" clearable style="width: 200px;margin-left: 16px;" />
<vxe-grid v-bind="gridOptions" style="margin-top: 10px">
<template #opera="{row}">
<el-button type="text" icon="el-icon-check" @click="handelStart(row)" />
<el-button type="text" icon="el-icon-close" @click="handleDel(row)" />
<template #operate="{row}">
<div class="btn-item">
<span>{{ row.record }}</span>
<span v-if="row.recordSegmentationList && row.recordSegmentationList.length > 0">【<el-button type="text" @click="handleDetails(row)"></el-button></span>
</div>
</template>
<template #result="{row}">
<div v-if="row.newFlag" style="padding: 10px 0;">
@ -32,15 +46,20 @@
@pagination="fetchData"
/>
</div>
<record-details ref="details" />
</div>
</template>
<script>
import mixin from '@/views/mixin'
import { queryIndexDetail } from '@/api/caseDetails'
import { debounce } from '@/utils'
import RecordDetails from './RecordDetails.vue'
export default {
name: 'IncriminateIndex',
components: {
RecordDetails
},
mixins: [mixin],
props: {
//
@ -56,6 +75,16 @@ export default {
},
data() {
return {
indexResultOptions: [{
name: '未评估',
id: '0'
}, {
name: '符合',
id: '1'
}, {
name: '不符合',
id: '2'
}],
gridOptions: {
...mixin.data().gridOptions,
treeConfig: {
@ -70,7 +99,7 @@ export default {
{ title: '数据来源', field: 'indexSource', width: '200px', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} },
{ title: '笔录结果', field: 'record' }
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' },
// { title: '', field: 'startTime' },
@ -78,6 +107,11 @@ export default {
],
data: []
},
indexName: '',
indexResult: '',
indexHasRecord: undefined,
atomicName: '',
indexSource: '',
indexSourceList: JSON.parse(sessionStorage.getItem('index_source'))
}
},
@ -89,19 +123,51 @@ export default {
}
},
immediate: true
},
indexName: function() {
this.debounceSearch(this)
},
indexResult: function() {
this.debounceSearch(this)
},
indexHasRecord: function() {
this.debounceSearch(this)
},
atomicName: function() {
this.debounceSearch(this)
},
indexSource: function() {
this.debounceSearch(this)
}
},
mounted() {
this.fetchData()
},
methods: {
//
debounceSearch: debounce((_this) => {
_this.fetchData()
}),
//
fetchData() {
queryIndexDetail({ caseId: this.$route.params['id'], indexType: '2' }, this.queryForm.page, this.queryForm.size).then(res => {
const params = { caseId: this.$route.params['id'],
indexType: '2',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName,
indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName,
indexSource: this.indexSource
}
queryIndexDetail(params).then(res => {
this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total
})
},
handleDetails(row) {
this.$refs.details.show(row.recordSegmentationList)
},
//
handelStart(row) {
@ -117,5 +183,11 @@ export default {
</script>
<style scoped lang="scss">
.incriminate-content {
.btn-item {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

@ -8,10 +8,24 @@
<template>
<div class="innocent-content">
<el-input v-model="indexName" placeholder="指标名称" clearable style="width: 200px" />
<el-select v-model="indexResult" style="margin-left: 16px;" clearable placeholder="请选择指标结果">
<el-option v-for="item in indexResultOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<el-select v-model="indexHasRecord" style="margin-left: 16px;" clearable placeholder="请选择笔录结果">
<el-option label="有笔录" :value="true" />
<el-option label="无笔录" :value="false" />
</el-select>
<el-select v-model="indexSource" style="margin-left: 16px;" clearable placeholder="请选择数据来源">
<el-option v-for="item in indexSourceList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-input v-model="atomicName" placeholder="原子指标名称" clearable style="width: 200px;margin-left: 16px;" />
<vxe-grid v-bind="gridOptions" style="margin-top: 10px">
<template #opera="{row}">
<el-button type="text" icon="el-icon-check" @click="handelStart(row)" />
<el-button type="text" icon="el-icon-close" @click="handleDel(row)" />
<template #operate="{row}">
<div class="btn-item">
<span>{{ row.record }}</span>
<span v-if="row.recordSegmentationList && row.recordSegmentationList.length > 0">【<el-button type="text" @click="handleDetails(row)"></el-button></span>
</div>
</template>
<template #result="{row}">
<div v-if="row.newFlag" style="padding: 10px 0;">
@ -30,15 +44,20 @@
@pagination="fetchData"
/>
</div>
<record-details ref="details" />
</div>
</template>
<script>
import mixin from '@/views/mixin'
import { queryIndexDetail } from '@/api/caseDetails'
import { debounce } from '@/utils'
import RecordDetails from './RecordDetails.vue'
export default {
name: 'InnocentIndex',
components: {
RecordDetails
},
mixins: [mixin],
props: {
//
@ -54,6 +73,16 @@ export default {
},
data() {
return {
indexResultOptions: [{
name: '未评估',
id: '0'
}, {
name: '符合',
id: '1'
}, {
name: '不符合',
id: '2'
}],
gridOptions: {
...mixin.data().gridOptions,
treeConfig: {},
@ -66,7 +95,7 @@ export default {
{ title: '数据来源', width: '200px', field: 'indexSource', formatter: ({ cellValue }) => {
return cellValue ? this.indexSourceList.find(item => item.value === cellValue).label : ''
} },
{ title: '笔录结果', field: 'record' },
{ title: '笔录结果', width: '200px', slots: { default: 'operate' }, align: 'center' }
// { title: '', field: 'atomicIndex' }
// { title: '', field: 'questioner' },
// { title: '', field: 'startTime' },
@ -75,6 +104,11 @@ export default {
data: []
},
indexName: '',
indexResult: '',
indexHasRecord: undefined,
atomicName: '',
indexSource: '',
indexSourceList: JSON.parse(sessionStorage.getItem('index_source'))
}
},
@ -86,19 +120,51 @@ export default {
}
},
immediate: true
},
indexName: function() {
this.debounceSearch(this)
},
indexResult: function() {
this.debounceSearch(this)
},
indexHasRecord: function() {
this.debounceSearch(this)
},
atomicName: function() {
this.debounceSearch(this)
},
indexSource: function() {
this.debounceSearch(this)
}
},
mounted() {
this.fetchData()
},
methods: {
//
debounceSearch: debounce((_this) => {
_this.fetchData()
}),
//
fetchData() {
queryIndexDetail({ caseId: this.$route.params['id'], indexType: '3' }, this.queryForm.page, this.queryForm.size).then(res => {
const params = { caseId: this.$route.params['id'],
indexType: '3',
page: this.queryForm.page,
size: this.queryForm.size,
indexName: this.indexName,
indexResult: this.indexResult,
indexHasRecord: this.indexHasRecord,
atomicName: this.atomicName,
indexSource: this.indexSource
}
queryIndexDetail(params).then(res => {
this.gridOptions.data = res.data.records
this.queryForm.total = res.data.total
})
},
handleDetails(row) {
this.$refs.details.show(row.recordSegmentationList)
},
//
handelStart(row) {
@ -114,5 +180,11 @@ export default {
</script>
<style scoped lang="scss">
.innocent-content {
.btn-item {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

@ -0,0 +1,54 @@
<template>
<cs-drawer
:drawer-option="drawerOption"
>
<div slot="content" class="RecordDetails">
<div v-for="(item, index) in dataList" :key="index" class="record-item">
<div>{{ item.question }}</div>
<div>{{ item.answer }}</div>
<div>{{ item.noteName }}</div>
</div>
</div>
</cs-drawer>
</template>
<script>
export default {
name: 'RecordDetails',
data() {
return {
drawerOption: {
show: false,
title: '笔录详情',
hiddenFooter: true
},
dataList: []
}
},
methods: {
show(data) {
this.drawerOption.show = true
this.dataList = data
}
}
}
</script>
<style scoped lang="scss">
.RecordDetails {
display: flex;
flex-direction: column;
padding: 16px;
overflow: auto;
.record-item {
margin-bottom: 16px;
border-bottom: 1px solid #DBE9FE;
div {
margin-bottom: 16px;
line-height: 24px;
}
}
}
</style>

@ -14,7 +14,7 @@
<div class="main-constent">
<div class="left">
<div class="search">
<el-input v-model="name" clearable placeholder="搜索名称" />
<el-input style="width: 300px;" v-model="name" clearable placeholder="搜索名称" />
<el-button type="primary" style="margin-left: 16px;" @click="handleSearch"></el-button>
</div>

@ -71,8 +71,8 @@
<el-date-picker
v-model="recordForm['confessionTime']"
type="datetimerange"
format="yyyy-MM-dd hh:mm"
value-format="yyyy-MM-dd hh:mm"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm"
start-placeholder="请选择开始时间"
end-placeholder="请选择结束时间"
style="width: 100%"

@ -53,7 +53,7 @@
<el-date-picker
v-model="recordForm['confessionTime']"
type="datetimerange"
format="yyyy-MM-dd hh:mm"
format="yyyy-MM-dd HH:mm"
start-placeholder="请选择开始时间"
end-placeholder="请选择结束时间"
style="width: 100%"

@ -375,12 +375,12 @@ export default {
border-radius: 8px;
}
.info-left {
width: 10%;
overflow-y: auto;
overflow-x: hidden;
min-width: 245px;
// overflow-y: auto;
// overflow-x: hidden;
}
.info-right {
width: 90%;
flex: 1;
margin-left: 10px;
>div {
margin-top: 10px;

@ -23,7 +23,7 @@
<el-date-picker
v-model="changeForm['createTime']"
type="datetimerange"
format="yyyy-MM-dd hh:mm"
format="yyyy-MM-dd HH:mm"
start-placeholder="开始时间"
end-placeholder="结束时间"
style="width: 100%"

@ -136,9 +136,21 @@ export default {
{ groupLogic: '1', rowLogic: '1', atomicData: [{ atomicIndex: '', relationalSymbol: '' }] }
],
//
logicSymbolOptions: JSON.parse(sessionStorage.getItem('logic_symbol')),
logicSymbolOptions: JSON.parse(sessionStorage.getItem('logic_symbol'))
//
symbolOptions: JSON.parse(sessionStorage.getItem('judge_result'))
// symbolOptions: JSON.parse(sessionStorage.getItem('judge_result'))
}
},
computed: {
symbolOptions() {
const list = JSON.parse(sessionStorage.getItem('judge_result'))
// eslint-disable-next-line no-const-assign
for (let i = 0; i < list.length; i++) {
if (list[i].label === '未知') {
list.splice(i, 1)
}
}
return list
}
},
watch: {

@ -112,7 +112,7 @@ export default {
methods: {
//
fetchData() {
queryIndexData(this.searchFormData, this.queryForm.page, this.queryForm.size).then(res => {
queryIndexData({ ...this.searchFormData, page: this.queryForm.page, size: this.queryForm.size }).then(res => {
this.gridOptions.data = res.data.result
this.queryForm.total = res.data.total
})

@ -44,8 +44,9 @@ export default {
methods: {
fetchData() {
queryIndexData({
indexType: this.indexType
}, this.queryForm.page, 9999).then(res => {
indexType: this.indexType,
page: this.queryForm.page, size: this.queryForm.size
}).then(res => {
this.gridOptions.data = res.data.result
this.queryForm.total = res.data.total
})

@ -8,13 +8,14 @@
<template>
<div class="account-content">
<cs-search :data="searchData" :span="8" direction="row" @getData="onSearch" />
<cs-search :data="searchData" :span="8" direction="row" @getData="onSearch" />
<div class="content-info">
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd"></el-button>
<vxe-grid v-bind="gridOptions" style="margin-top: 20px">
<template #operate="{row}">
<!-- <el-button type="text" @click="handleDetails(row)"></el-button> -->
<el-button type="text" @click="handleEdit(row)"></el-button>
<el-button v-if="adminFlag ==='1'" type="text" @click="editPassword(row)"></el-button>
<el-button type="text" style="color: red" @click="handleDel(row)"></el-button>
</template>
<template #status="{row}">
@ -37,6 +38,42 @@
</div>
<!--编辑用户-->
<edit-account ref="edit" @reloadData="fetchData" />
<!--修改密码界面-->
<cs-dialog :dialog="dialogData" @onSubmit="onSubmit">
<div slot="content">
<el-row type="flex" justify="center">
<el-col :span="20">
<el-form
ref="dataForm"
:model="dataForm"
label-width="80px"
:rules="dataFormRules"
size="small"
label-position="right"
>
<el-form-item label="新密码" prop="newPassword">
<el-input
v-model="dataForm.newPassword"
placeholder="请输入新密码"
auto-complete="off"
show-password
/>
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input
v-model="dataForm.confirmPassword"
placeholder="请输入确认密码"
auto-complete="off"
show-password
/>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
<div slot="footer" />
</cs-dialog>
</div>
</template>
@ -44,17 +81,55 @@
import mixin from '@/views/mixin'
import EditAccount from '@/views/system/accountManagement/components/EditAccount.vue'
import { getUserList, deleteUserInfo, updateUserStatus, getRoleList } from '@/api/system/user.js'
import { mapGetters } from 'vuex'
import { changePassword } from '@/api/base/user'
export default {
name: 'AccountManagement',
components: { EditAccount },
mixins: [mixin],
data() {
const equalToPassword = (rule, value, callback) => {
if (this.dataForm.newPassword !== value) {
callback(new Error('两次输入的密码不一致'))
} else {
callback()
}
}
return {
searchData: [
{ label: '用户名', model: 'userName', type: 'input' },
{ label: '角色', model: 'roleId', type: 'select', option: [] }
],
//
dataForm: {
newPassword: ''
},
dataFormRules: {
newPassword: [
{ required: true, message: '请输入新密码', trigger: 'blur' },
{
min: 6,
max: 20,
message: '长度在 6 到 20 个字符',
trigger: 'blur'
}
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ required: true, validator: equalToPassword, trigger: 'blur' }
]
},
account: '',
roleList: [],
dialogData: {
show: false,
appendToBody: true,
height: 400,
width: '50%',
title: {
title: '修改密码'
}
},
gridOptions: {
...mixin.data().gridOptions,
columns: [
@ -72,6 +147,11 @@ export default {
}
}
},
computed: {
...mapGetters({
adminFlag: 'user/adminFlag'
})
},
mounted() {
this.tableHeight(400)
this.queryRoleList()
@ -90,7 +170,7 @@ export default {
},
queryRoleList() {
getRoleList({
pageNum : 1,
pageNum: 1,
pageSize: 999
}).then(res => {
const list = []
@ -136,6 +216,25 @@ export default {
this.fetchData()
})
},
editPassword(row) {
this.account = row.account
this.dialogData.show = true
},
onSubmit(callback) {
const _this = this
this.$refs.dataForm.validate(async(valid) => {
if (valid) {
await changePassword({
password: this.dataForm.newPassword,
account: this.account
})
_this.$baseMessage.success('修改成功!')
callback(true)
}
})
},
//
onSearch(data, callback) {
this.searchFormData = Object.assign({}, data)

Loading…
Cancel
Save