|
@@ -5,6 +5,8 @@
|
|
|
:data="data"
|
|
|
:page.sync="page"
|
|
|
:permission="permissionList"
|
|
|
+ id="out-table"
|
|
|
+ :header-cell-class-name="headerClassName"
|
|
|
:before-open="beforeOpen"
|
|
|
v-model="form"
|
|
|
ref="crud"
|
|
@@ -13,29 +15,127 @@
|
|
|
@row-del="rowDel"
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
|
- @selection-change="selectionChange"
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
@refresh-change="refreshChange"
|
|
|
+ @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 288)"
|
|
|
+ @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 288)"
|
|
|
@on-load="onLoad">
|
|
|
- <template slot="menuLeft">
|
|
|
- <el-button type="danger"
|
|
|
- size="small"
|
|
|
- icon="el-icon-delete"
|
|
|
- plain
|
|
|
- v-if="permission.task_delete"
|
|
|
- @click="handleDelete">删 除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope" slot="tsInfo">
|
|
|
+ <span style="color: #1e9fff" @click="chakanfun(scope.row,scope.index)">{{scope.row.tsInfo}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="isDateExceeded">
|
|
|
+ <span :style="scope.row.isDateExceeded=='已超时'?'color: #de4a3b':'color: #65da78'">{{scope.row.isDateExceeded}}</span>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click.stop="rowAddfun(scope.row, scope.index)">添加任务
|
|
|
+ </el-button>
|
|
|
+ <div style="display: flex;align-items: center;margin-top: 10px">
|
|
|
+ <div class="bottomStatistics" style="background: #ffff00" @click="searchChangefun()">全部({{page.total}})</div>
|
|
|
+ <div class="bottomStatistics" style="background: #f8cbad" @click="searchChangefun({type:1})">待执行({{statistics.waitingQuantity}})</div>
|
|
|
+ <div class="bottomStatistics" style="background: #00b050" @click="searchChangefun({type:2})">执行中({{statistics.carryTheQuantity}})</div>
|
|
|
+ <div class="bottomStatistics" style="background: #ffe699" @click="searchChangefun({type:3})">已提交({{statistics.numberOfCommits}})</div>
|
|
|
+ <div class="bottomStatistics" style="background: #a9d08e" @click="searchChangefun({type:4})">工单关闭({{statistics.theNumberOfClosures}})</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.responsibleUserId && scope.row.type == 1"
|
|
|
+ @click.stop="Acceptancefun(scope.row)"
|
|
|
+ >受理
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.responsibleUserId && scope.row.type == 2"
|
|
|
+ @click.stop="submitTofun(scope.row)"
|
|
|
+ >提交
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.createUser && scope.row.type == 3"
|
|
|
+ @click.stop="determinefun(scope.row)"
|
|
|
+ >确认
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.createUser && scope.row.type == 3"
|
|
|
+ @click.stop="returnfun(scope.row)"
|
|
|
+ >退回
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.createUser && scope.row.type == 3"
|
|
|
+ @click.stop="evaluatefun(scope.row,scope.index)"
|
|
|
+ >评价
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :type="scope.type"
|
|
|
+ :size="scope.size"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ :disabled="scope.row.type == 4"
|
|
|
+ @click.stop="editOpen(scope.row, scope.index)">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :type="scope.type"
|
|
|
+ :size="scope.size"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="responsibleUserObj.createUser == scope.row.createUser"
|
|
|
+ :disabled="scope.row.type == 4"
|
|
|
+ @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="4" v-for="item in taskCompletionData" :key="item.id">
|
|
|
+ <el-card class="box-card">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>{{item.userName}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="card-flex">
|
|
|
+ <div class="card-flexLeft" style="color: #ebc4a5">待执行:</div>
|
|
|
+ <div class="card-flexRight">{{item.waitingQuantity}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="card-flex">
|
|
|
+ <div class="card-flexLeft" style="color: #52a54a">执行中:</div>
|
|
|
+ <div class="card-flexRight">{{item.carryTheQuantity}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="card-flex">
|
|
|
+ <div class="card-flexLeft" style="color: #f8e292">已提交:</div>
|
|
|
+ <div class="card-flexRight">{{item.numberOfCommits}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="card-flex">
|
|
|
+ <div class="card-flexLeft" style="color: #de4a3b">超期:</div>
|
|
|
+ <div class="card-flexRight">{{item.theNumberOfTimeouts}}</div>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, remove} from "@/api/TaskKanban/task";
|
|
|
+import {getList, getDetail, add, update, remove, taskCompletion} from "@/api/TaskKanban/task";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import {getPostList} from "@/api/system/post";
|
|
|
- import website from "@/config/website";
|
|
|
+import Da from "element-ui/src/locale/lang/da";
|
|
|
+import {getUserApprovalList} from "@/api/approval/processConfig";
|
|
|
+import {dateFormat} from "@/util/date";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -48,46 +148,78 @@
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
- selectionList: [],
|
|
|
- option: {
|
|
|
+ option:{},
|
|
|
+ optionBack: {
|
|
|
+ addTitle:'创建任务',
|
|
|
+ editTitle:'编辑任务',
|
|
|
+ viewTitle:'查看任务',
|
|
|
+ addBtnText:'创建任务',
|
|
|
+ // dialogDrag:true,
|
|
|
height:'auto',
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
searchShow: true,
|
|
|
- searchMenuSpan: 6,
|
|
|
+ searchMenuSpan: 24,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
viewBtn: true,
|
|
|
- selection: true,
|
|
|
+ selection: false,
|
|
|
dialogClickModal: false,
|
|
|
column: [
|
|
|
- {
|
|
|
- label: "负责人",
|
|
|
- prop: "responsibleUserId",
|
|
|
- search: true,
|
|
|
- type:'select',
|
|
|
- dicUrl: "/api/blade-user/userList",
|
|
|
- props: {
|
|
|
- label: "realName",
|
|
|
- value: "id"
|
|
|
+ {
|
|
|
+ label: "需求方",
|
|
|
+ prop: "createUserName",
|
|
|
+ display:false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "负责人",
|
|
|
+ prop: "responsibleUserId",
|
|
|
+ search: true,
|
|
|
+ type:'select',
|
|
|
+ filterable:true,
|
|
|
+ dicUrl: "/api/blade-user/userList",
|
|
|
+ props: {
|
|
|
+ label: "realName",
|
|
|
+ value: "id"
|
|
|
+ },
|
|
|
+ dicData:[],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择负责人",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ // hide:true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "抄送人",
|
|
|
+ prop: "ccId",
|
|
|
+ type:'tree',
|
|
|
+ dicUrl: "/api/blade-user/userList",
|
|
|
+ multiple: true,
|
|
|
+ props: {
|
|
|
+ label: "realName",
|
|
|
+ value: "id"
|
|
|
+ },
|
|
|
+ dicData:[],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择抄送人",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ // hide:true,
|
|
|
},
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请选择负责人",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- // hide:true,
|
|
|
- },
|
|
|
{
|
|
|
label: "岗位",
|
|
|
prop: "postId",
|
|
|
search: true,
|
|
|
type:'select',
|
|
|
+ filterable:true,
|
|
|
dicData:[],
|
|
|
props: {
|
|
|
label: "postName",
|
|
|
value: "id"
|
|
|
},
|
|
|
+ width:100,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请选择岗位",
|
|
@@ -98,6 +230,9 @@
|
|
|
label: "任务内容",
|
|
|
prop: "tsInfo",
|
|
|
search: true,
|
|
|
+ type: 'textarea',
|
|
|
+ span: 24,
|
|
|
+ minRows: 3,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入任务信息",
|
|
@@ -107,7 +242,12 @@
|
|
|
{
|
|
|
label: "要求完成时间",
|
|
|
prop: "completionTime",
|
|
|
- // type:'data',
|
|
|
+ width:160,
|
|
|
+ labelWidth:100,
|
|
|
+ type: "datetime",
|
|
|
+ format: "yyyy-MM-dd hh:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
|
|
|
+ searchRange: true,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入要求完成时间",
|
|
@@ -117,6 +257,14 @@
|
|
|
{
|
|
|
label: "是否紧急",
|
|
|
prop: "isUrgency",
|
|
|
+ type:'select',
|
|
|
+ dicData:[{
|
|
|
+ label:'否',
|
|
|
+ value:0
|
|
|
+ },{
|
|
|
+ label:'是',
|
|
|
+ value:1
|
|
|
+ }],
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "请输入是否紧急",
|
|
@@ -126,129 +274,322 @@
|
|
|
{
|
|
|
label: "未完成原因",
|
|
|
prop: "unfinishedCause",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入未完成原因",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "附件",
|
|
|
- prop: "accessory",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入附件",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ width:120,
|
|
|
},
|
|
|
{
|
|
|
label: "评价",
|
|
|
prop: "evaluate",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入评价",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ display:false,
|
|
|
},
|
|
|
{
|
|
|
label: "单据类型",
|
|
|
prop: "documentType",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入单据类型",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ display:false,
|
|
|
+ hide:true,
|
|
|
+ dicData:[{
|
|
|
+ label:'任务',
|
|
|
+ value:1
|
|
|
+ },{
|
|
|
+ label:'状态',
|
|
|
+ value:2
|
|
|
+ }],
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "状态",
|
|
|
+ prop: "type",
|
|
|
+ display:false,
|
|
|
+ type:'select',
|
|
|
+ dicData:[{
|
|
|
+ label:'待执行',
|
|
|
+ value:1
|
|
|
+ },{
|
|
|
+ label:'执行中',
|
|
|
+ value:2
|
|
|
+ },{
|
|
|
+ label:'已提交',
|
|
|
+ value:3
|
|
|
+ },{
|
|
|
+ label:'工单关闭',
|
|
|
+ value:4
|
|
|
+ },{
|
|
|
+ label:'未完成',
|
|
|
+ value:5
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "是否超时",
|
|
|
+ prop: "isDateExceeded",
|
|
|
+ display:false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "下发时间",
|
|
|
+ prop: "createTime",
|
|
|
+ search: true,
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd",
|
|
|
+ unlinkPanels: true,
|
|
|
+ searchRange: true,
|
|
|
+ display:false,
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "完成时间",
|
|
|
+ prop: "accomplishTime",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd hh:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
|
|
|
+ unlinkPanels: true,
|
|
|
+ searchRange: true,
|
|
|
+ display:false,
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
{
|
|
|
label: "备注",
|
|
|
prop: "remarks",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入备注",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
+ type: 'textarea',
|
|
|
+ span: 24,
|
|
|
+ minRows: 3,
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "附件",
|
|
|
+ hide:true,
|
|
|
+ prop: "accessory",
|
|
|
+ type: 'upload',
|
|
|
+ propsHttp: {
|
|
|
+ url: 'link',
|
|
|
+ name: 'name',
|
|
|
+ res: 'data'
|
|
|
+ },
|
|
|
+ listType:'picture-card',
|
|
|
+ dataType:'string',
|
|
|
+ // dataType:'object',
|
|
|
+ // props: {
|
|
|
+ // label: 'name',
|
|
|
+ // value: 'url'
|
|
|
+ // },
|
|
|
+ tip: '只能上传jpg/png文件,且不超过500kb',
|
|
|
+ action: '/api/blade-resource/oss/endpoint/put-file',
|
|
|
+ span: 24,
|
|
|
+ },
|
|
|
{
|
|
|
label: "参考号",
|
|
|
prop: "refno",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入参考号",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "状态",
|
|
|
- prop: "type",
|
|
|
+ hide:true,
|
|
|
display:false,
|
|
|
},
|
|
|
{
|
|
|
label: "创建人",
|
|
|
prop: "createUser",
|
|
|
- display:false,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "下发时间",
|
|
|
- prop: "createTime",
|
|
|
- search: true,
|
|
|
- type: "date",
|
|
|
- format: "yyyy-MM-dd",
|
|
|
- valueFormat: "yyyy-MM-dd",
|
|
|
- unlinkPanels: true,
|
|
|
- searchRange: true,
|
|
|
+ hide:true,
|
|
|
display:false,
|
|
|
},
|
|
|
{
|
|
|
label: "修改人",
|
|
|
+ hide:true,
|
|
|
prop: "updateUser",
|
|
|
display:false,
|
|
|
},
|
|
|
{
|
|
|
label: "修改时间",
|
|
|
+ hide:true,
|
|
|
prop: "updateTime",
|
|
|
+ width: 160,
|
|
|
display:false,
|
|
|
},
|
|
|
{
|
|
|
- label: "是否已删除(0 否 1是)",
|
|
|
+ label: "是否已删除",
|
|
|
+ hide:true,
|
|
|
+ // (0 否 1是)
|
|
|
prop: "isDeleted",
|
|
|
display:false,
|
|
|
+ type:'select',
|
|
|
+ dicData:[{
|
|
|
+ label:'否',
|
|
|
+ value:0
|
|
|
+ },{
|
|
|
+ label:'是',
|
|
|
+ value:1
|
|
|
+ }],
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
- data: []
|
|
|
+ data: [],
|
|
|
+ taskCompletionData:[],
|
|
|
+ // 当前登录人的名称和id
|
|
|
+ responsibleUserObj:[],
|
|
|
+ // 表头筛选
|
|
|
+ statistics:{},
|
|
|
+ // 负责人数据
|
|
|
+ dicDataName:[],
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- // this.getPostListfun(website.tenantId)
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(288), this.optionBack);
|
|
|
+ // 传租户号查询岗位信息
|
|
|
+ this.getPostListfun(JSON.parse(localStorage.getItem('saber-tenantId')).content)
|
|
|
+
|
|
|
+ // 获取当前登录人的名称和id
|
|
|
+ // console.log(JSON.parse(localStorage.getItem('saber-userInfo')).content.role_name)
|
|
|
+ let role = JSON.parse(localStorage.getItem('saber-userInfo')).content
|
|
|
+ this.responsibleUserObj.createUser = role.user_id
|
|
|
+ this.responsibleUserObj.createUserName = role.real_name
|
|
|
+ this.getUserApprovalListfun()
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["permission"]),
|
|
|
permissionList() {
|
|
|
return {
|
|
|
- // addBtn: this.vaildData(this.permission.task_add, false),
|
|
|
+ addBtn: this.vaildData(this.permission.task_add, false),
|
|
|
viewBtn: this.vaildData(this.permission.task_view, false),
|
|
|
delBtn: this.vaildData(this.permission.task_delete, false),
|
|
|
editBtn: this.vaildData(this.permission.task_edit, false)
|
|
|
};
|
|
|
},
|
|
|
- ids() {
|
|
|
- let ids = [];
|
|
|
- this.selectionList.forEach(ele => {
|
|
|
- ids.push(ele.id);
|
|
|
- });
|
|
|
- return ids.join(",");
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取负责人数据
|
|
|
+ getUserApprovalListfun(){
|
|
|
+ getUserApprovalList().then(res=>{
|
|
|
+ this.findObject(this.option.column, "responsibleUserId").dicData = res.data.data
|
|
|
+ this.findObject(this.option.column, "ccId").dicData = res.data.data
|
|
|
+ this.dicDataName = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 受理接口
|
|
|
+ Acceptancefun(row) {
|
|
|
+ this.$confirm("确定将选择数据受理?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.updatefun(row,2)
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ // 提交
|
|
|
+ submitTofun(row) {
|
|
|
+ this.$confirm("确定将选择数据提交?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.updatefun(row,3)
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ // 确认事件
|
|
|
+ determinefun(row){
|
|
|
+ if (!row.evaluate) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "请评价后再点工单确认!"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.updatefun({...row,accomplishTime:dateFormat(new Date())},4)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 退回事件
|
|
|
+ returnfun(row){
|
|
|
+ this.$confirm("确定将选择数据确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.updatefun(row,2)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 评价
|
|
|
+ evaluatefun(row,index){
|
|
|
+ this.findObject(this.option.column, "ccId").disabled = true
|
|
|
+ this.findObject(this.option.column, "responsibleUserId").disabled = true
|
|
|
+ this.findObject(this.option.column, "postId").disabled = true
|
|
|
+ this.findObject(this.option.column, "tsInfo").disabled = true
|
|
|
+ this.findObject(this.option.column, "completionTime").disabled = true
|
|
|
+ this.findObject(this.option.column, "isUrgency").disabled = true
|
|
|
+ this.findObject(this.option.column, "accessory").disabled = true
|
|
|
+
|
|
|
+ this.findObject(this.option.column, "unfinishedCause").disabled = false
|
|
|
+ this.findObject(this.option.column, "evaluate").disabled = false
|
|
|
+ this.findObject(this.option.column, "evaluate").display = true
|
|
|
+ this.$refs.crud.rowEdit(row, index)
|
|
|
+ },
|
|
|
+ // 查看
|
|
|
+ chakanfun(row,index) {
|
|
|
+ this.$refs.crud.rowView(row, index)
|
|
|
+ },
|
|
|
+ // 保存更改状态
|
|
|
+ updatefun(row,type){
|
|
|
+ update({
|
|
|
+ ...row,
|
|
|
+ updateUser:this.responsibleUserObj.createUser,
|
|
|
+ updateUserName:this.responsibleUserObj.createUserName,
|
|
|
+ type:type
|
|
|
+ }).then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ }, error => {
|
|
|
+ loading();
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 更改表格颜色
|
|
|
+ headerClassName(tab){
|
|
|
+ //颜色间隔
|
|
|
+ let back = ""
|
|
|
+ if (tab.columnIndex >= 0 && tab.column.level === 1) {
|
|
|
+ if (tab.columnIndex % 2 === 0) {
|
|
|
+ back = "back-one"
|
|
|
+ } else if (tab.columnIndex % 2 === 1) {
|
|
|
+ back = "back-two"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return back;
|
|
|
+ },
|
|
|
+ // 获取岗位信息
|
|
|
getPostListfun(tenantId){
|
|
|
getPostList(tenantId).then(res => {
|
|
|
- console.log(res,244)
|
|
|
const column = this.findObject(this.option.column, "postId");
|
|
|
column.dicData = res.data.data;
|
|
|
});
|
|
|
},
|
|
|
+ // 添加
|
|
|
+ rowAddfun(row,index) {
|
|
|
+ this.findObject(this.option.column, "ccId").disabled = false
|
|
|
+ this.findObject(this.option.column, "responsibleUserId").disabled = false
|
|
|
+ this.findObject(this.option.column, "postId").disabled = false
|
|
|
+ this.findObject(this.option.column, "tsInfo").disabled = false
|
|
|
+ this.findObject(this.option.column, "completionTime").disabled = false
|
|
|
+ this.findObject(this.option.column, "isUrgency").disabled = false
|
|
|
+ this.findObject(this.option.column, "accessory").disabled = false
|
|
|
+ this.$refs.crud.rowAdd()
|
|
|
+ },
|
|
|
+ // 添加确认
|
|
|
rowSave(row, done, loading) {
|
|
|
- add(row).then(() => {
|
|
|
+ row.ccId = row.ccId.join()
|
|
|
+ this.dicDataName.map(item=>{
|
|
|
+ if (row.responsibleUserId == item.id) {
|
|
|
+ row.responsibleUserName = item.realName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ add({
|
|
|
+ ...row,
|
|
|
+ type:1,
|
|
|
+ ...this.responsibleUserObj,
|
|
|
+ }).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
@@ -260,8 +601,13 @@
|
|
|
window.console.log(error);
|
|
|
});
|
|
|
},
|
|
|
+ // 编辑弹窗确认按钮
|
|
|
rowUpdate(row, index, done, loading) {
|
|
|
- update(row).then(() => {
|
|
|
+ update({
|
|
|
+ ...row,
|
|
|
+ updateUser:this.responsibleUserObj.createUser,
|
|
|
+ updateUserName:this.responsibleUserObj.createUserName
|
|
|
+ }).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
@@ -273,6 +619,21 @@
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
+ // 编辑
|
|
|
+ editOpen(row,index){
|
|
|
+ if (this.responsibleUserObj.createUser == row.createUser) {
|
|
|
+ }else {
|
|
|
+ this.findObject(this.option.column, "ccId").disabled = true
|
|
|
+ this.findObject(this.option.column, "responsibleUserId").disabled = true
|
|
|
+ this.findObject(this.option.column, "postId").disabled = true
|
|
|
+ this.findObject(this.option.column, "tsInfo").disabled = true
|
|
|
+ this.findObject(this.option.column, "completionTime").disabled = true
|
|
|
+ this.findObject(this.option.column, "isUrgency").disabled = true
|
|
|
+ this.findObject(this.option.column, "accessory").disabled = true
|
|
|
+ }
|
|
|
+ this.$refs.crud.rowEdit(row, index)
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
rowDel(row) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -280,28 +641,11 @@
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- return remove(row.id);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
+ return remove({
|
|
|
+ ...row.id,
|
|
|
+ updateUser:this.responsibleUserObj.createUser,
|
|
|
+ updateUserName:this.responsibleUserObj.createUserName
|
|
|
});
|
|
|
- });
|
|
|
- },
|
|
|
- handleDelete() {
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
- this.$message.warning("请选择至少一条数据");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.$confirm("确定将选择数据删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- return remove(this.ids);
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.onLoad(this.page);
|
|
@@ -309,9 +653,9 @@
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
- this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
beforeOpen(done, type) {
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getDetail(this.form.id).then(res => {
|
|
@@ -324,19 +668,20 @@
|
|
|
this.query = {};
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
+ // 搜索
|
|
|
searchChange(params, done) {
|
|
|
this.query = params;
|
|
|
this.page.currentPage = 1;
|
|
|
+ params.createTimeSelect = params.createTime
|
|
|
+ delete params.createTime
|
|
|
this.onLoad(this.page, params);
|
|
|
done();
|
|
|
},
|
|
|
- selectionChange(list) {
|
|
|
- this.selectionList = list;
|
|
|
- },
|
|
|
- selectionClear() {
|
|
|
- this.selectionList = [];
|
|
|
- this.$refs.crud.toggleSelection();
|
|
|
- },
|
|
|
+ // 搜索分类
|
|
|
+ searchChangefun(params){
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, params);
|
|
|
+ },
|
|
|
currentChange(currentPage){
|
|
|
this.page.currentPage = currentPage;
|
|
|
},
|
|
@@ -346,19 +691,82 @@
|
|
|
refreshChange() {
|
|
|
this.onLoad(this.page, this.query);
|
|
|
},
|
|
|
+ // 查询列表接口
|
|
|
onLoad(page, params = {}) {
|
|
|
- // this.loading = true;
|
|
|
- // getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
- // const data = res.data.data;
|
|
|
- // this.page.total = data.total;
|
|
|
- // this.data = data.records;
|
|
|
- // this.loading = false;
|
|
|
- // this.selectionClear();
|
|
|
- // });
|
|
|
- }
|
|
|
+ this.loading = true;
|
|
|
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+ this.page.total = data.pages.total;
|
|
|
+ this.data = data.pages.records;
|
|
|
+ this.statistics = data.statistics
|
|
|
+ this.loading = false;
|
|
|
+ this.taskCompletionfun() // 查询统计
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 查询统计数据
|
|
|
+ taskCompletionfun(){
|
|
|
+ taskCompletion().then(res=>{
|
|
|
+ this.taskCompletionData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumnTwo(ref, option, optionBack, code) {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumnTwo(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scoped>
|
|
|
+ ::v-deep#out-table .back-one {
|
|
|
+ background: #ffc000 !important;
|
|
|
+ }
|
|
|
+ ::v-deep#out-table .back-two {
|
|
|
+ background: #ffc000 !important;
|
|
|
+ }
|
|
|
+ .clearfix {
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ .card-flex {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .card-flex:first-child {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+ .card-flexLeft {
|
|
|
+ width: 80px;
|
|
|
+ }
|
|
|
+ .card-flexRight {
|
|
|
+
|
|
|
+ }
|
|
|
+ .bottomStatistics {
|
|
|
+ padding: 10px 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
</style>
|