123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- <template>
- <div class="evaluationBusiness">
- <div class="evaluationBusinessBtn">
- <div class="collectSeach" :style="$utils.collectSeachSty()">
- <div class="exceed">
- <span class="exceedSpan">业务编号:</span>
- <el-input v-model="rescode" placeholder="请输入业务编号"></el-input>
- </div>
- <div class="exceed">
- <span class="exceedSpan">业务简述:</span>
- <el-input v-model="resDes" placeholder="请输入业务简述"></el-input>
- </div>
- <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
- <el-button size="mini" color="#3B7AD1" icon="Operation" v-if="userId === '23031009'"
- @click="businessTableFn" style="margin-left: 10px">
- <span>统计汇总</span>
- </el-button>
- </div>
- <div class="evaluationBusinessTableData">
- <el-table :data="evaluationBusinessData" style="width: 100%" @row-dblclick="getDetail">
- <el-table-column type="selection" label="操作" align="center"></el-table-column>
- <el-table-column label="业务编号" prop="responsibilityCode" width="300" />
- <el-table-column label="考评年度" prop="appraisalYear" width="200" />
- <el-table-column label="考评部门" prop="deptName" width="200" />
- <!-- <el-table-column label="业务简述" prop="des">
- <template #default="scope">
- <el-tooltip class="box-item" effect="customized" :content="scope.row.des" placement="top">
- <span class="tooltipCC">{{scope.row.des}}</span>
- </el-tooltip>
- </template>
- </el-table-column> -->
- <el-table-column label="流程状态" prop="stage" width="200">
- <template #default="scope">
- <p class="indicitem" @click="seeStates(scope.row)">{{scope.row.stage}}</p>
- </template>
- </el-table-column>
- <el-table-column label="创建人" prop="createName" width="200" />
- <el-table-column label="创建时间" prop="createTime" width="200" />
- <el-table-column label="操作" width="160">
- <template #default="scope">
- <div style="display:flex">
- <p class="indicitem" v-if="scope.row.stage === '流程未启动'"
- @click="agetdeptresponsibility(scope.row)">启动</p>
- <!-- <p class="indicitem" v-else @click="getDetail(scope.row)">详情</p> -->
- <p style="font-size: 12px;margin-right: 20px;" v-else-if="scope.row.stage === '流程已结束'">
- 已结束</p>
- <p style="font-size: 12px;margin-right: 20px;" v-else>已启动</p>
- <p class="indicitem" v-if="scope.row.stage === '流程已结束'"
- @click="getGenerateReport(scope.row)">生成报表</p>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="page.currentPage" :page-size="page.pagesize"
- layout="total, prev, pager, next, jumper" :total="page.total">
- </el-pagination>
- </div>
- <el-dialog title="流程详情" v-model="statesVisible" :fullscreen="true" :close-on-click-modal="false">
- <div class="flowSty">
- <iframe id="iframeContain" width="100%" height="500px" frameborder="0" class="iframe"
- name="iframeContain" seamless scrolling="no" :src="iframeURL">
- </iframe>
- <el-table :data="stageArr" style="width: 100%">
- <el-table-column type="index" label="序号" align="center" />
- <el-table-column label="任务名称" prop="taskName" />
- <el-table-column label="任务创建时间" prop="createTime" />
- <el-table-column label="任务处理时间" prop="approveTime" />
- <el-table-column label="候选人" prop="assignInfo" width="300">
- <template #default="scope">
- <span>{{changeAssignInfo(scope.row)}}</span>
- </template>
- </el-table-column>
- <el-table-column label="执行人" prop="approverName" />
- <el-table-column label="处理状态" prop="status">
- <template #default="scope">
- <div v-if="scope.row.status === 'start'">启动</div>
- <div v-else-if="scope.row.status === 'agree'">同意</div>
- <div v-else-if="scope.row.status === 'awaiting_check'">等待,待审批</div>
- <div v-else-if="scope.row.status === 'reject'">驳回</div>
- </template>
- </el-table-column>
- <el-table-column label="备注/意见" prop="opinion" />
- </el-table>
- </div>
- </el-dialog>
- </div>
- <business-from-list ref="businessFromDetail"></business-from-list>
- <business-table ref="businessTable"></business-table>
- </div>
- </template>
- <script>
- import businessFromList from './evaluationDeptBusinessFrom.vue'
- import businessTable from './evaluationDeptBusinessTab.vue'
- import btns from '../elbuttonS.vue'
- import seachs from '../seachGroup.vue'
- import {
- saveAs
- } from 'file-saver'
- import {
- apiGetevaluationdeptassessmentlist,
- apiGetdoAction,
- apideptModifyassessmentState,
- apiGetworkflowgetOpinion,
- apiGetevaluationgenerateReport,
- apiGetevaluationdownloadReport
- } from '../../api/api'
- export default {
- components: {
- businessFromList,
- businessTable,
- btns,
- seachs
- },
- data() {
- return {
- evaluationBusinessData: [],
- page: {
- pagesize: 12,
- currentPage: 1,
- total: 0
- },
- rescode: '',
- resDes: '',
- iframeURL: '',
- stageArr: [],
- statesVisible: false,
- userId: ''
- }
- },
- created() {
- this.getevaluBusinessList()
- },
- methods: {
- // 查询列表页面
- getevaluBusinessList() {
- let that = this
- let userMes = JSON.parse(window.sessionStorage.getItem('user'))
- this.userId = userMes.deptId
- let params = {
- pageNum: that.page.currentPage,
- pageSize: that.page.pagesize,
- deptId: userMes.deptId,
- responsibilityCode: that.rescode,
- des: that.resDes
- }
- apiGetevaluationdeptassessmentlist(params).then(datas => {
- if (datas && datas.data) {
- that.evaluationBusinessData = datas.data.records
- that.page.total = datas.data.total
- }
- })
- },
- businessTableFn() {
- this.$refs.businessTable.init(this.departData)
- },
- agetdeptresponsibility(row) {
- let that = this
- let par = {
- defKey: "bbbmyjzbkh",
- businessKey: row.id,
- action: "start",
- opinion: "本部部门业绩指标考核",
- iamCode: window.localStorage.getItem('code')
- }
- apiGetdoAction(par).then(datas => {
- if (datas && datas.data) {
- if (!datas.data.isOk) {
- that.$message({
- message: datas.data.msg,
- type: 'error'
- });
- } else {
- let params = {
- id: row.id,
- stage: '流程已开始'
- }
- apideptModifyassessmentState(params).then(values => {
- if (values.success) {
- that.getevaluBusinessList()
- } else {
- that.$message({
- message: values.message,
- type: 'error'
- });
- }
- })
- }
- }
- })
- },
- //明细
- getDetail(row) {
- let userMes = JSON.parse(window.sessionStorage.getItem('user'))
- let ispersonDept = window.sessionStorage.getItem('ispersonDept')
- if (row.stage === '流程未启动') {
- if (ispersonDept === 'true') {
- this.$refs.businessFromDetail.init(row)
- }
- } else {
- this.$refs.businessFromDetail.init(row)
- }
- },
- changeAssignInfo(row) {
- let showStr = ''
- if (row.assignInfo) {
- showStr = row.assignInfo.substring(row.assignInfo.indexOf('-') + 1, row.assignInfo.length)
- .substring(0, row.assignInfo.substring(row.assignInfo.indexOf('-') + 1, row.assignInfo.length)
- .indexOf('-'))
- }
- return showStr
- },
- seeStates(row) {
- if (!row.instId) {
- this.$message({
- type: 'error',
- message: '无法查看流程'
- });
- } else {
- this.statesVisible = true
- let url = ''
- if (window.location.hostname === '10.65.78.81') {
- url = 'http://10.65.79.85:8080'
- } else {
- url = 'http://10.65.78.23:8080'
- }
- this.iframeURL = url + '/agilebpm-ui/bpm/instance/instanceImageDialog.html?instanceId=' + row
- .instId + '&iamCode=' + window.localStorage.getItem('code')
- this.getstageData(row.instId)
- }
- },
- // 根据流程id获取业务id
- getstageData(id) {
- let that = this
- let params = {
- instId: id,
- iamCode: window.localStorage.getItem('code')
- }
- apiGetworkflowgetOpinion(params).then(datas => {
- if (datas && datas.data) {
- that.stageArr = datas.data.data
- }
- })
- },
- getSeachData() {
- this.page.currentPage = 1
- this.getevaluBusinessList()
- },
- resetSeach() {
- this.page.currentPage = 1
- this.rescode = ''
- this.resDes = ''
- this.getevaluBusinessList()
- },
- handleSizeChange(val) {
- this.page.pagesize = val
- this.getevaluBusinessList()
- },
- handleCurrentChange(val) {
- this.page.currentPage = val
- this.getevaluBusinessList()
- },
- getGenerateReport(row) {
- let that = this
- apiGetevaluationgenerateReport(row.id).then(datas => {
- if (datas.success) {
- apiGetevaluationdownloadReport(datas.data).then(datass => {
- let blob = new Blob([datass], {
- type: 'application/msword;charset=UTF-8'
- })
- saveAs(blob, `${datas.data}`)
- })
- } else {
- that.$message({
- message: datas.message,
- type: 'error'
- });
- }
- })
- }
- }
- }
- </script>
- <style lang="less">
- .evaluationBusiness {
- .evaluationBusinessBtn {
- .collectSeach {
- display: flex;
- padding: 24px 20px;
- border-bottom: 1px solid#D6DBEA;
- .exceed {
- display: flex;
- .exceedSpan {
- width: 100px;
- height: 12px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #8991B0;
- line-height: 12px;
- margin-top: 14px;
- }
- .el-input {
- margin-right: 10px;
- height: 40px;
- .el-input__inner {
- height: 40px;
- }
- .el-input__suffix {
- .el-select__caret {
- line-height: 30px;
- }
- }
- }
- }
- .el-select {
- margin-right: 10px;
- .el-input__inner {
- height: 30px;
- }
- .el-input__suffix {
- .el-select__caret {
- line-height: 30px;
- }
- }
- }
- }
- span {
- font-size: 14px;
- }
- .el-button {
- height: 30px;
- // width:100px;
- padding: 0 20px;
- // padding-top: 8px;
- span {
- margin: 0;
- }
- }
- .evaluationBusinessTableData {
- .el-table {
- .el-table__body-wrapper {
- height: 68vh !important;
- }
- .el-input__inner {
- height: 30px !important;
- }
- .el-radio__label {
- display: none;
- }
- .tooltipCC {
- width: 300px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .tooltipCCDes {
- width: 200px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .indicitem {
- color: #409EFF;
- font-size: 12px;
- margin-right: 20px;
- cursor: pointer;
- &:hover {
- text-decoration: underline;
- }
- }
- }
- .el-pagination {
- margin-top: 20px;
- text-align: end;
- position: relative;
- }
- }
- .el-overlay {
- .startToDia {
- .el-dialog__body {
- padding: 30px 60px 30px 20px !important;
- .periodFrom {
- .el-select,
- .el-input {
- width: 100%;
- }
- .el-input {
- height: 30px;
- }
- }
- .flowSty {
- width: 100%;
- height: 70vh;
- }
- }
- }
- }
- }
- }
- </style>
|