Commit 43e5292c authored by WangXu's avatar WangXu

任务统计查看详情,流程名称修改

parent 9db49dc4
<template> <template>
<div class="mt-show-input"> <div class="mt-show-input" :style="inputWidth">
<input <input
ref="input" ref="input"
:class="inputTypeClass" :class="inputTypeClass"
...@@ -9,13 +9,12 @@ ...@@ -9,13 +9,12 @@
@click="handleClick" @click="handleClick"
@blur="handleBlur" @blur="handleBlur"
/> />
<div class="icon" @click="handleIconClick"> <div class="icon" @click="handleIconClick" v-if="!isEdit">
<slot name="icon"></slot> <slot name="icon"></slot>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -36,8 +35,17 @@ ...@@ -36,8 +35,17 @@
inputTypeClass() { inputTypeClass() {
return { return {
'text': !this.isEdit, 'text': !this.isEdit,
'has-icon': this.$slots.icon 'has-icon': this.$slots.icon,
'editting': this.isEdit
}
},
inputWidth() {
if (this.isEdit) {
return {
width: '100%'
}
} }
return {}
} }
}, },
watch: { watch: {
...@@ -82,21 +90,32 @@ ...@@ -82,21 +90,32 @@
.mt-show-input { .mt-show-input {
position: relative; position: relative;
} }
input { input {
border: none; /*border: none;*/
border-bottom: black 1px solid; /*border-bottom: black 1px solid;*/
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: border-color 0.3s;
} }
input:focus { input:focus {
border: none; /*border: none;*/
border-bottom: black 1px solid; /*border-bottom: black 1px solid;*/
outline-offset: 0; /*outline-offset: 0;*/
outline: none; /*outline: none;*/
border-color: #40a9ff;
outline: 0;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
border-right-width: 1px !important;
} }
.text { .text {
/*background-color: black;*/ /*background-color: black;*/
border: none; border: none;
} }
.has-icon{
.has-icon {
padding-right: 35px; padding-right: 35px;
} }
...@@ -105,6 +124,7 @@ ...@@ -105,6 +124,7 @@
outline-offset: 0; outline-offset: 0;
outline: none; outline: none;
} }
.icon { .icon {
position: absolute; position: absolute;
right: 0; right: 0;
...@@ -112,4 +132,8 @@ ...@@ -112,4 +132,8 @@
width: 30px; width: 30px;
cursor: pointer; cursor: pointer;
} }
.editting {
width: 100%;
}
</style> </style>
...@@ -11,8 +11,8 @@ import { ...@@ -11,8 +11,8 @@ import {
// 创建 axios 实例 // 创建 axios 实例
const service = axios.create({ const service = axios.create({
// baseURL: 'http://106.2.13.200:8032', // api base_url baseURL: 'http://106.2.13.200:8032', // api base_url
baseURL: 'http://192.168.0.142:8080', // api base_url // baseURL: 'http://192.168.9.23:8080', // api base_url
timeout: 6000 // 请求超时时间 timeout: 6000 // 请求超时时间
}) })
......
...@@ -19,50 +19,19 @@ ...@@ -19,50 +19,19 @@
<div class="tdc_table"> <div class="tdc_table">
<a-table :columns="columns" :dataSource="data" bordered> <a-table :columns="columns" :dataSource="data" bordered>
<template slot="operation" slot-scope="text, record"> <template slot="operation" slot-scope="text, record">
<span @click="goDetail(record)">查看详情</span> <span style="cursor: pointer" @click="goDetail(record)">查看详情</span>
</template> </template>
</a-table> </a-table>
</div> </div>
</div> </div>
</a-card> </a-card>
<a-drawer <detail-dialog
:title="currentRowData.workTitle" @closeModel="isDialogShow = false"
placement="right" :isDialogShow="isDialogShow"
:width="720" ref="Mydrawer"
@close="onClose" :eletype="'myTask'"
:closable="false" :fromDataItem="detailData"
:visible="visible" ></detail-dialog>
v-if="visible"
>
<div class="formItem">
<span style="margin-right: 50px">工单编号</span>
<span>{{DeatilData.workBase.workNo || '暂无数据'}}</span>
</div>
<div class="formItem">
<span style="margin-right: 50px">工单状态</span>
<span>{{getStateLabel(DeatilData.workBase.workStatus) || '暂无数据'}}</span>
</div>
<div v-for="(item) in DeatilData.workTemplateData" class="formItem">
<span style="margin-right: 50px">{{item.fieldNm || '暂无数据'}}</span>
<span>{{item.fieldValue || '暂无数据'}}</span>
</div>
<div style="display: flex" v-if="isHaveRecoed">
<span>工单进度</span>
<el-timeline style="margin-left: 50px;padding: 0">
<el-timeline-item
v-for="(activity, index) in DeatilData.workRecordsList"
:key="index"
size="large"
:timestamp="activity.handleTime">
<span>{{activity.hadlePerson}}</span>
{{activity.handleContent}}
</el-timeline-item>
</el-timeline>
</div>
<div v-if="!isHaveRecoed">
<span>无审批记录</span>
</div>
</a-drawer>
</div> </div>
</page-view> </page-view>
</div> </div>
...@@ -72,6 +41,7 @@ ...@@ -72,6 +41,7 @@
import { PageView } from '@/layouts'; import { PageView } from '@/layouts';
import dataStatisticsTop from './components/data-statistics-top'; import dataStatisticsTop from './components/data-statistics-top';
import { taskList } from '@/api/taskStatistics'; import { taskList } from '@/api/taskStatistics';
import DetailDialog from './components/detail-dialog'
const columns = [ const columns = [
{ {
...@@ -118,7 +88,8 @@ ...@@ -118,7 +88,8 @@
name: "task-data-statistics", name: "task-data-statistics",
components: { components: {
PageView, PageView,
dataStatisticsTop dataStatisticsTop,
DetailDialog
}, },
data() { data() {
return { return {
...@@ -128,8 +99,9 @@ ...@@ -128,8 +99,9 @@
rowSelection, rowSelection,
visible: false, visible: false,
currentRowData: {}, currentRowData: {},
DeatilData: {}, detailData: {},
isHaveRecoed: false isHaveRecoed: false,
isDialogShow: false
} }
}, },
methods: { methods: {
...@@ -165,27 +137,28 @@ ...@@ -165,27 +137,28 @@
}, },
getWorkInfo(workId) { getWorkInfo(workId) {
this.$http({ this.$http({
url: '/task/task-info/statisticsTaskContent', url: '/task/task-info/getWorkInfo',
method: 'get', method: 'get',
params: { params: {
workId: workId workId: workId
} }
}).then(res => { }).then(res => {
console.log(res); if (res.code === 'M0000') {
if (res.data.workRecordsList.length == 0) { this.detailData = res.data
this.isHaveRecoed = false this.isDialogShow = true
} else { } else {
this.isHaveRecoed = true this.$notify({
type: 'err',
title: '失败',
message: res.msg
})
} }
this.DeatilData = res.data
this.visible = true
}) })
}, },
goDetail(val) { goDetail(val) {
this.currentRowData = val this.currentRowData = val
console.log(val); console.log(val);
this.getWorkInfo(val.workId) this.getWorkInfo(val.workId)
this.visible = true
}, },
onClose() { onClose() {
this.visible = false this.visible = false
......
...@@ -28,20 +28,20 @@ ...@@ -28,20 +28,20 @@
defaultActiveKey="1" defaultActiveKey="1"
class="custom-panel-tabs" class="custom-panel-tabs"
style="width: 550px;background-color: #ffffff;height: calc(100% - 30px)"> style="width: 550px;background-color: #ffffff;height: calc(100% - 30px)">
<a-tab-pane v-if="showCreatorTab" tab="创建人设置" key="3" forceRender> <!--<a-tab-pane v-if="showCreatorTab" tab="创建人设置" key="3" forceRender>-->
<a-card class="custom-panel-field-list" :bodyStyle="fieldListCardStyle" :bordered="false"> <!-- <a-card class="custom-panel-field-list" :bodyStyle="fieldListCardStyle" :bordered="false">-->
<a-form layout="vertical"> <!-- <a-form layout="vertical">-->
<a-form-item <!-- <a-form-item-->
label="谁可以创建这个任务?"> <!-- label="谁可以创建这个任务?">-->
<role-select-tree-input v-model="createRolesData"></role-select-tree-input> <!-- <role-select-tree-input v-model="createRolesData"></role-select-tree-input>-->
</a-form-item> <!-- </a-form-item>-->
</a-form> <!-- </a-form>-->
<div class="custom-panel-btn"> <!-- <div class="custom-panel-btn">-->
<a-button>取消</a-button> <!-- <a-button>取消</a-button>-->
<a-button type="primary" @click="submitCreator" style="margin-left: 30px">保存</a-button> <!-- <a-button type="primary" @click="submitCreator" style="margin-left: 30px">保存</a-button>-->
</div> <!-- </div>-->
</a-card> <!-- </a-card>-->
</a-tab-pane> <!--</a-tab-pane>-->
<a-tab-pane v-if="showApproverTab" tab="审批人设置" key="2" forceRender> <a-tab-pane v-if="showApproverTab" tab="审批人设置" key="2" forceRender>
<a-card class="custom-panel-field-list" :bodyStyle="fieldListCardStyle" :bordered="false"> <a-card class="custom-panel-field-list" :bodyStyle="fieldListCardStyle" :bordered="false">
<a-form layout="vertical"> <a-form layout="vertical">
...@@ -1059,7 +1059,7 @@ ...@@ -1059,7 +1059,7 @@
line-height: 22px; line-height: 22px;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 10px; padding: 20px 10px;
} }
.custom-panel-btn { .custom-panel-btn {
......
...@@ -17,22 +17,24 @@ ...@@ -17,22 +17,24 @@
</div> </div>
<div class="group-item" v-for="(taskItem, taskIndex) in groupItem.templateList" :key="taskIndex"> <div class="group-item" v-for="(taskItem, taskIndex) in groupItem.templateList" :key="taskIndex">
<div class="item" style="width: auto;"> <div class="item" style="width: auto;">
<img <div style="">
:src="taskItem.iconImage || defaultIcon" <img
style="width: 50px;height: 50px;float: left;margin-right: 12px;border-radius: 8px;"> :src="taskItem.iconImage || defaultIcon"
<div style="float: left;"> style="width: 50px;height: 50px;float: left;margin-right: 12px;border-radius: 8px;">
<div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;"> <div style="float: left;">
{{ taskItem.templateNm }} <div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;">
</div> {{ taskItem.templateNm }}
<div class="text-desc"> </div>
{{ taskItem.templateExplain }} <div class="text-desc">
{{ taskItem.templateExplain }}
</div>
</div> </div>
</div> </div>
<a-divider type="vertical" style="height: 60px"/> <a-divider type="vertical" style="height: 60px"/>
</div> </div>
<div class="item" style="width:auto;position: relative;"> <div class="item" style="width:auto;position: relative;">
<div style="float: left;"> <div style="float: left;width: calc(100% - 50px);">
<div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;"> <div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;">
可见范围 可见范围
</div> </div>
...@@ -41,22 +43,23 @@ ...@@ -41,22 +43,23 @@
{{ taskItem.createRoleNames}} {{ taskItem.createRoleNames}}
</div> </div>
</div> </div>
<span <div class="btndivider">
@click="showModal(taskItem)" <span
style="color: #1890ff; cursor: pointer;font-size: 12px;" @click="showModal(taskItem)"
>修改</span> style="color: #1890ff; cursor: pointer;font-size: 12px;"
<a-divider type="vertical" style="height: 60px"/> >修改</span>
<a-divider type="vertical" style="height: 60px;"/>
</div>
</div> </div>
<div class="item" style="width: auto"> <div class="item" style="width: auto">
<div style="float: left;position: relative;"> <div style="float: left;position: relative;width: calc(100% - 50px);">
<div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;"> <div style="font-size: 15px;color: #323334;letter-spacing: 0;text-align: left;">
工单开放入口 工单开放入口
</div> </div>
<div class="text-desc" v-if="taskItem.phone == 1"> <div class="text-desc" style="padding-top: 8px;" v-if="taskItem.phone == 1">
手机创建 手机创建
<a-modal <a-modal
title="工单开放入口" title="工单开放入口"
...@@ -71,7 +74,7 @@ ...@@ -71,7 +74,7 @@
</a-radio-group> </a-radio-group>
</a-modal> </a-modal>
</div> </div>
<div class="text-desc" v-else> <div class="text-desc" style="padding-top: 8px;" v-else>
不可开发人工创建 不可开发人工创建
<a-modal <a-modal
title="工单开放入口" title="工单开放入口"
...@@ -87,13 +90,15 @@ ...@@ -87,13 +90,15 @@
</a-modal> </a-modal>
</div> </div>
</div> </div>
<span <div class="btndivider">
@click="showModalE" <span
style="color: #1890ff; cursor: pointer;font-size: 12px;" @click="showModalE"
>修改</span> style="color: #1890ff; cursor: pointer;font-size: 12px;"
<a-divider type="vertical" style="height: 60px"/> >修改</span>
<a-divider type="vertical" style="height: 60px"/>
</div>
</div> </div>
<div class="item btns"> <div class="item btns">
<a @click="editTask(taskItem.id)">编辑</a> <a @click="editTask(taskItem.id)">编辑</a>
<!-- <a @click="deploymentTask(taskItem.templateId)">部署</a>--> <!-- <a @click="deploymentTask(taskItem.templateId)">部署</a>-->
...@@ -292,15 +297,32 @@ ...@@ -292,15 +297,32 @@
border-bottom: 1px #e8e8e8 solid; border-bottom: 1px #e8e8e8 solid;
.item{ .item{
flex: auto; /*max-width: 270px;*/
flex: 1 1 25%;
position: relative; position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0 0 20px;
}
.item:first-child{
padding: 0 0 0 0px;
}
.btndivider{
width: 65px;
& > span{
margin-right: 20px;
}
}
.btns{
flex: none;
} }
.text-desc { .text-desc {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
width: 166px; width: 100%;
font-size: 12px; font-size: 12px;
color: #858585; color: #858585;
letter-spacing: 0; letter-spacing: 0;
...@@ -312,7 +334,6 @@ ...@@ -312,7 +334,6 @@
} }
.footer { .footer {
padding: 0 16px; padding: 0 16px;
margin: 48px 0 24px; margin: 48px 0 24px;
......
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