1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207 |
- <template>
- <div
- class="bgborder"
- style="background-color:#F2F3F6;min-height:calc(100vh - 80px);padding:0 0px 10px 10px"
- >
- <div class="stylus-head">
- <mainTitle
- title="任务"
- btn-text="新建任务"
- :tab-show="true"
- @btn-handle="open_created"
- @change-tab="changeTab"
- />
- <div v-if="nowTab === 'charts'" class="chartView">
- <chartView
- :data="chartData"
- :type-option-list="typeOptionList"
- :chart-search-data="form_task"
- @search="get_charts()"
- @changeList="(code) => get_chartListDetial(code)"
- >
- <div slot="searchBox">
- <div class="Layout">
- <div class="Layout">
- <div class="chartSearchTitle">模块</div>
- <el-cascader
- v-model="form_task.moduleIds"
- size="small"
- clearable
- collapse-tags
- :props="props"
- :options="business_platform_Modular"
- placeholder="请选择"
- style="width:77% !important;"
- @change="get_charts()"
- />
- </div>
- <span
- class="screen"
- style="text-align:right; width: auto"
- @click="showChartModal = true"
- >更多筛选</span>
- </div>
- </div>
- </chartView>
- </div>
- <div v-if="nowTab === 'list'" class="search_box">
- <div class="Layout" style="padding: 5px 0 0 15px">
- <div>
- <el-form :model="form_task" class="Layout">
- <div class="Layout_flex_end item">
- <div class="queryName">任务名称</div>
- <el-input
- v-model="form_task.name"
- size="small"
- clearable
- class="input"
- placeholder="请输入标题或ID或望岳ID"
- @change="get_taskList()"
- />
- </div>
- <div class="Layout item">
- <div class="queryName">状态</div>
- <el-select
- v-model="form_task.statusList"
- size="small"
- class="input"
- multiple
- clearable
- filterable
- placeholder="请选择"
- @change="get_taskList()"
- >
- <el-option
- v-for="item in daStatus"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">模块</div>
- <el-cascader
- v-model="form_task.moduleIds"
- size="small"
- class="input"
- clearable
- collapse-tags
- :props="props"
- :options="business_platform_Modular"
- placeholder="请选择"
- @change="get_taskList()"
- />
- </div>
- </el-form>
- </div>
- <span class="screen" @click="showSelect">{{ goodName }}</span>
- </div>
- <div v-show="DetailedScreening" class="stylus-more">
- <div>
- <div class="Layout" style="margin: 15px 0;">
- <el-form :model="form_task" class="flex_start">
- <div class="Layout item">
- <div class="queryName">所属项目</div>
- <el-select
- v-model="form_task.projectId"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in projectList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">所属需求</div>
- <el-select
- v-model="form_task.requireId"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in demandList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">来自望岳</div>
- <el-select
- v-model="form_task.isFromDpm"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in isFromDpmList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- </el-form>
- </div>
- <div class="Layout" style="margin: 15px 0;">
- <el-form :model="form_task" class="flex_start">
- <div class="Layout item">
- <div class="queryName">优先级</div>
- <el-select
- v-model="form_task.priority"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in arr_priority"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">负责人</div>
- <el-select
- v-model="form_task.PersonInCharge"
- class="input"
- clearable
- filterable
- remote
- placeholder="请输入姓名或邮箱前缀"
- :remote-method="remoteMethod"
- :loading="loading"
- size="small"
- >
- <el-option
- v-for="item in options"
- :key="item.idap"
- :label="item.name"
- :value="test2(item, 0)"
- >
- <div class="flex_start">
- <div class="deptName">{{ item.deptName }}</div>
- <div style="min-width:80px">{{ item.name }}</div>
- <div class="deptName">{{ item.idap }}</div>
- </div>
- </el-option>
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">健康状态</div>
- <el-select
- v-model="form_task.stage"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in healthStage"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- </el-form>
- </div>
- <div class="Layout" style="margin: 15px 0;">
- <el-form :model="form_task" class="flex_start">
- <div class="Layout item">
- <div class="queryName">创建人</div>
- <el-select
- v-model="form_task.creater"
- class="input"
- clearable
- filterable
- remote
- placeholder="请输入姓名或邮箱前缀"
- :remote-method="remoteMethod"
- :loading="loading"
- size="small"
- style="width: 82%;"
- >
- <el-option
- v-for="item in options"
- :key="item.idap"
- :label="item.name"
- :value="test2(item, 0)"
- >
- <div class="flex_start">
- <div class="deptName">{{ item.deptName }}</div>
- <div style="min-width:80px">{{ item.name }}</div>
- <div class="deptName">{{ item.idap }}</div>
- </div>
- </el-option>
- </el-select>
- </div>
- <div class="Layout item">
- <div class="queryName">是否免测</div>
- <el-select
- v-model="form_task.notest"
- size="small"
- class="input"
- clearable
- filterable
- placeholder="请选择"
- >
- <el-option
- v-for="item in isNoTest"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </div>
- </el-form>
- </div>
- <div class="Layout" style="margin: 15px 0;">
- <el-form :model="form_task" class="flex_start">
- <div class="Layout item">
- <div class="queryName">创建日期</div>
- <el-date-picker
- v-model="form_task.date"
- type="daterange"
- align="right"
- unlink-panels
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- size="small"
- class="input"
- style="min-width: 458px"
- value-format="yyyy-MM-dd HH:mm:ss"
- :default-time="['00:00:00','23:59:59']"
- :picker-options="pickerOptions"
- />
- </div>
- </el-form>
- </div>
- <div align="right">
- <el-button type="text" @click="showSaveSearch = true">保存筛选项</el-button>
- <el-button type="primary" size="mini" @click="get_taskList(form_task)">筛 选</el-button>
- <el-button size="mini" @click="query_Reset">重 置</el-button>
- </div>
- </div>
- </div>
- <div v-if="filterList.length && filterList.length > 0" class="filter">
- <div class="filterWrap">
- <div class="title">我的过滤器:</div>
- <div class="itemBox">
- <el-tag
- v-for="item in filterList"
- :key="item.id"
- class="itemFilter"
- @click="getFilterItem(item.id)"
- >{{ item.name }}</el-tag>
- </div>
- </div>
- <div class="btn">
- <span @click.stop="showEditSearch = true">管理过滤器</span>
- </div>
- </div>
- </div>
- </div>
- <div class="stylus-content">
- <div v-if="nowTab === 'charts'" class="subtitle">{{ tableTitle }}</div>
- <el-table
- v-loading="table_loading"
- :data="task_table"
- style="width: 100%;"
- highlight-current-row
- :header-cell-style="{ 'background': nowTab === 'charts' ? '#F7F7F7' : '#fff', 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }"
- :cell-style="{ 'font-size':'14px','color':'rgba(102,102,102,1)' }"
- size="small"
- show-overflow-tooltip="true"
- >
- <el-table-column label="优先级" width="90" prop="priority" sortable align="right">
- <template slot-scope="scope">
- <div
- class="div_priority"
- :style="{background: priorityColors[scope.row.priority]}"
- >{{ scope.row.priorityString }}</div>
- </template>
- </el-table-column>
- <el-table-column label="任务名称" min-width="250" show-overflow-tooltip align="left">
- <template slot-scope="scope">
- <span style="font-size: 12px;color: rgba(167,174,188,1);">
- {{ scope.row.taskIdSting }}
- <span
- v-if="scope.row.tagNotification !== null && scope.row.status !== -2"
- :class="{
- 'tagNotification': scope.row.tagType === 0,
- 'tagNotification1': scope.row.tagType === 1
- }"
- >{{ scope.row.tagNotification }}</span>
- <span v-if="scope.row.status === -2" class="tagNotification1">{{ 'hold' }}</span>
- </span>
- <br>
- <span class="stylus-hover" @click="link_task(scope.row.id)">{{ scope.row.name }}</span>
- </template>
- </el-table-column>
- <el-table-column label="状态" min-width="150" align="center" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-select
- v-if="nowTab === 'charts'"
- v-model="scope.row.status"
- :size="size"
- placeholder
- @change="(e) => statusChange(e, scope.row.id)"
- >
- <el-option
- v-for="o in scope.row.availableStatusList"
- :key="o.code"
- :label="o.name"
- :value="o.code"
- />
- </el-select>
- <span v-else>{{ scope.row.statusString }}</span>
- </template>
- </el-table-column>
- <el-table-column label="健康状态" width="150" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.stageString }}</template>
- </el-table-column>
- <el-table-column label="开发负责人" min-width="100" align="center">
- <template
- slot-scope="scope"
- >{{ scope.row.rdObject !== null? scope.row.rdObject.name: '' }}</template>
- </el-table-column>
- <el-table-column label="测试负责人" min-width="100" align="center">
- <template slot-scope="scope">{{ scope.row.qaObject !== null?scope.row.qaObject.name: '' }}</template>
- </el-table-column>
- <el-table-column label="所属模块" width="150" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.moduleInfoName }}</template>
- </el-table-column>
- <el-table-column label="是否免测" min-width="80" align="center">
- <template slot-scope="scope">{{ scope.row.noTestString }}</template>
- </el-table-column>
- <el-table-column label="缺陷数量" width="250" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.bugCount }}</template>
- </el-table-column>
- <el-table-column label="所属需求" min-width="250" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.requireName }}</template>
- </el-table-column>
- <el-table-column label="所属项目" min-width="250" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.projectName }}</template>
- </el-table-column>
- <el-table-column label="创建人" min-width="120" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.createObject.name }}</template>
- </el-table-column>
- <el-table-column label="创建日期" min-width="120" align="center" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.createTime }}</template>
- </el-table-column>
- </el-table>
- <div align="right">
- <el-pagination
- background
- :current-page="currentPage"
- :page-sizes="[15,30,45,total]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </div>
- </div>
- <!-- 弹窗 -->
- <openDialog v-if="dialog_open" ref="task_createdUpdata" />
- <normal-dialog
- :show-dialog="showSaveSearch"
- :title="'保存筛选项'"
- :width="'35%'"
- @confirm="saveSearch('searchForm')"
- @cancel="showSaveSearch=false"
- >
- <div v-if="showSaveSearch" class="file-dialog">
- <el-form ref="searchForm" :model="searchForm" :rules="searchFormRules" label-width="100px">
- <el-form-item label="过滤器名称" prop="name">
- <el-input v-model="searchForm.name" placeholder="不超过50个字符" />
- </el-form-item>
- </el-form>
- </div>
- </normal-dialog>
- <normal-dialog
- :show-footer="false"
- :show-dialog="showEditSearch"
- :title="'管理过滤器'"
- :width="'65%'"
- @cancel="showEditSearch=false"
- >
- <filter-list :show-filter="showEditSearch" :filter-type="2" @deleteFilter="deleteFilter" />
- </normal-dialog>
- <filterModal
- title="筛选项"
- :show-dialog="showChartModal"
- @reset="query_Reset"
- @cancel="showChartModal = false"
- @confirm="filterModalConfirm"
- >
- <div>
- <chartSearchForm
- :data="chartSearchFormRenderData"
- :loading="loading"
- :styles="{ marginBottom: '15px', width: '380px' }"
- @change="chartSearchFormChange"
- @getOption="(key, q, utilName) => remoteMethod(q)"
- />
- </div>
- </filterModal>
- </div>
- </template>
- <script>
- const _ = require('lodash')
- import { EncryptId } from '@/utils/crypto-js.js'
- import { mapGetters } from 'vuex'
- import {
- taskList,
- configShowTaskEnum,
- memberQueryMemberInfoByIDAPorName,
- configShowRequirementVersionEnum,
- projectListProject,
- getFilterList,
- configShowTaskStatusEnum,
- createFilter,
- filterGetFilter,
- getChartListData,
- getChartData,
- updateStatus
- } from '@/api/taskIndex' // ajax
- import filterModal from '@/components/filterModal'
- import { settingQueryBizModuleList } from '@/api/defectManage'
- import openDialog from '@/views/projectManage/dialog_vue'
- // 过滤器
- import filterList from '@/views/projectManage/components/filterList'
- import normalDialog from '@/components/dialog/normalDialog'
- import mainTitle from '@/components/mainTitle'
- import chartView from '@/components/chartView'
- import chartSearchFormData from './renderData/chartSearchForm'
- import chartSearchForm from '@/components/searchHeader/searchForm'
- import '@/views/projectManage/publicCss/index.css'
- export default {
- components: {
- openDialog,
- filterList,
- normalDialog,
- mainTitle,
- chartView,
- filterModal,
- chartSearchForm
- },
- data() {
- return {
- size: 'small',
- pickerOptions: {
- shortcuts: [
- {
- text: '最近一周',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
- picker.$emit('pick', [start, end])
- }
- },
- {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
- picker.$emit('pick', [start, end])
- }
- },
- {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
- picker.$emit('pick', [start, end])
- }
- }
- ]
- },
- header_show: true,
- props: {
- value: 'id',
- label: 'moduleName',
- children: 'childModules',
- multiple: true
- },
- isFromDpmList: [
- { value: true, label: '是' },
- { value: false, label: '否' }
- ],
- isNoTest: [
- { value: 1, label: '是' },
- { value: 0, label: '否' }
- ],
- priorityColors: [
- '#F56C6C',
- '#FF8952',
- '#F5E300',
- '#7ED321',
- '#61D3B8',
- '#69B3FF',
- '#BDBDBD'
- ],
- arr_priority: [
- { value: 0, label: 'P0' },
- { value: 1, label: 'P1' },
- { value: 2, label: 'P2' },
- { value: 3, label: 'P3' }
- ],
- dialog_open: false,
- curIndex: 1,
- pageSize: 15,
- goodName: '更多筛选',
- options: [],
- daStatus: [], // 任务状态筛选option
- healthStage: [],
- list: [],
- userInformation: localStorage.getItem('username'),
- userNames: localStorage.getItem('realname'),
- form_task: {
- viewType: '0'
- },
- noTest: [], // 是否免测
- BusinessLine: [], // 业务线
- appClient: [], // 涉及业务线
- arr_platform: [], // 平台数据
- business_platform_Modular: [], // 模块数据
- arr_taskName: [], // 任务名称数据
- projectList: [], // 归属项目数据
- demandList: [], // 需求list
- dialogFormVisible: false,
- currentPage: 0,
- DetailedScreening: false,
- total: 0,
- biz: '',
- isToOne: true,
- loading: false,
- table_loading: false,
- test: {},
- task_table: [],
- form: {},
- arry: [],
- filterList: [],
- showEditSearch: false, // 显示管理过滤器
- searchForm: { name: null }, // 筛选项obj
- searchFormRules: {
- name: [
- { required: true, message: '请输入筛选项名称', trigger: 'blur' },
- { min: 1, max: 50, message: '长度在 1 到 50 个字符', trigger: 'blur' }
- ]
- },
- showSaveSearch: false, // 显示保存筛选项对话框
- nowTab: 'list',
- chartData: {},
- typeOptionList: [
- { value: '0', label: '任务状态' },
- { value: '1', label: '任务等级' },
- { value: '2', label: '开发负责人' },
- { value: '3', label: '测试负责人' },
- { value: '4', label: '跟版客户端' },
- { value: '5', label: '直接归属' }
- ],
- showChartModal: false,
- tableTitle: '',
- chartSearchFormRenderData: _.cloneDeep(chartSearchFormData)
- }
- },
- computed: {
- ...mapGetters(['bizId'])
- },
- watch: {
- bizId() {
- this.get_taskList()
- this.get_taskSelect()
- this.getFilterList() // 筛选项保存
- }
- },
- created() {
- this.get_taskList()
- this.get_taskSelect()
- this.bugDataGet()
- this.$store.state.data.status = true
- },
- mounted() {
- this.$nextTick(() => {
- this.bugDataGet()
- this.getFilterList() // 筛选项保存
- })
- this.updateChartSlectOption('isFromDpm', this.isFromDpmList)
- this.updateChartSlectOption('priority', this.arr_priority)
- },
- destroyed() {
- this.$store.state.data.status = false
- },
- methods: {
- filterModalConfirm() {
- this.showChartModal = false
- this.get_charts()
- },
- logHandle(d) {
- window.log({ c: 'task', d })
- },
- changeTab(e) {
- this.nowTab = e
- if (this.nowTab === 'charts') {
- this.get_charts()
- this.logHandle('changtab_task_charts')
- } else {
- this.chartData = {}
- this.get_taskList()
- }
- },
- async statusChange(e, id) {
- const res = await updateStatus({ status: e, id })
- if (res.code === 200) {
- this.get_charts()
- }
- },
- get_charts() {
- this.logHandle('get_task_charts')
- this.updateChartSearchFormValue()
- this.form_taskHandle()
- this.get_chartList()
- },
- async get_chartList() {
- this.table_loading = true
- // const res = await getChartData(this.form_task)
- getChartData(this.form_task).then(res => {
- this.chartData = res.data
- this.get_chartListDetial(res.data.data[0].code)
- }).catch(() => {
- this.table_loading = false
- })
- },
- async get_chartListDetial(code) {
- this.showChartModal = false
- if (code) {
- this.form_task.curIndex = 1
- this.form_task.code = code
- }
- const dataList = await getChartListData(this.form_task)
- this.task_table = dataList.data.list
- this.total = dataList.total
- this.tableTitle = dataList.data.title
- this.table_loading = false
- this.logHandle('get_task_charts_list_detial')
- },
- test2(item, e) {
- // 获取团队人员信息
- if (typeof this.test[item.idap] === 'undefined') {
- item.role = e
- this.test[item.idap] = item
- }
- return item.idap
- },
- // 保存筛选项
- saveSearch(formName) {
- // 保存筛选项
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.stratAndEnd = this.stratAndEnd ? this.stratAndEnd : []
- this.form_task.createStartTime = this.stratAndEnd[0] || null
- this.form_task.createEndTime = this.stratAndEnd[1] || null
- const isExistName = this.filterList.some((item) => {
- return item.name === this.searchForm.name
- })
- if (isExistName) {
- this.$message({
- showClose: true,
- message: '筛选项名称重名',
- type: 'error'
- })
- } else {
- this.toSave()
- }
- } else {
- this.$message({
- showClose: true,
- message: '筛选项名称不能为空',
- type: 'error'
- })
- return false
- }
- })
- },
- // 保存过滤器
- async toSave() {
- const saveObj = _.cloneDeep(this.form_task)
- delete saveObj.curIndex
- delete saveObj.pageSize
- const res = await createFilter({
- name: this.searchForm.name,
- content: JSON.stringify(saveObj),
- bizId: this.bizId,
- filterType: 2
- })
- if (res.code === 200) {
- this.$message({ showClose: true, message: '保存成功', type: 'success' })
- this.showSaveSearch = false
- this.getFilterList()
- this.searchForm.name = null
- }
- },
- async getFilterList() {
- // 获取过滤器列表
- const params = {
- bizId: this.bizId,
- filterType: 2
- }
- const res = await getFilterList(params)
- this.filterList = res.data
- },
- deleteFilter() {
- this.$router.push({ path: this.$route.path })
- this.getFilterList()
- },
- form_taskHandle() {
- if (this.bizId === -1) return
- // 查询
- if (this.isToOne) {
- this.curIndex = 1
- this.currentPage = 1
- }
- // this.table_loading = true
- this.form_task.bizId = this.bizId
- this.form_task.pageSize = this.pageSize
- this.form_task.curIndex = this.curIndex
- for (const key in this.form_task) {
- // 接口不接受空值的处理
- if (this.form_task[key] === '') {
- delete this.form_task[key]
- }
- }
- if (this.form_task.date) {
- this.form_task.createTimeBegin = this.form_task.date[0]
- this.form_task.createTimeEnd = this.form_task.date[1]
- } else {
- delete this.form_task.createTimeBegin
- delete this.form_task.createTimeEnd
- }
- },
- get_taskList(e) {
- this.form_taskHandle()
- taskList(this.form_task).then((res) => {
- this.task_table = res.data
- this.total = res.total
- this.table_loading = false
- this.logHandle('get_task')
- })
- configShowRequirementVersionEnum({ bizId: this.bizId }).then((res) => {
- // 获取需求(查询)
- const demandList = res.data.map((t) => ({
- ...t,
- label: t.name,
- value: t.id
- }))
- this.demandList = demandList
- this.updateChartSlectOption('requireId', demandList)
- })
- this.isToOne = true
- },
- async remoteMethod(query) {
- // 人员查询
- if (query !== '') {
- this.loading = true
- const res = await memberQueryMemberInfoByIDAPorName({
- memberIDAP: query
- })
- const obj = {}
- this.options = res.data.reduce((cur, next) => {
- obj[next.idap] ? '' : (obj[next.idap] = true && cur.push(next))
- return cur
- }, [])
- this.loading = false
- } else {
- this.options = []
- }
- this.updateChartSlectOption('PersonInCharge', this.options)
- this.updateChartSlectOption('creater', this.options)
- },
- showSelect() {
- this.DetailedScreening = !this.DetailedScreening
- this.goodName === '更多筛选'
- ? (this.goodName = '收起筛选')
- : (this.goodName = '更多筛选')
- },
- team_dates(e) {
- // 改变成员
- this.form.arry = []
- for (const i in e) {
- this.form.arry.push(this.test[e[i]])
- }
- this.arry = this.form.arry.map((item) => {
- return { memberIDAP: item.idap, department: item.deptid, role: 0 }
- })
- },
- open_created() {
- // 打开弹窗
- this.dialog_open = true
- this.$nextTick(() => {
- this.$refs.task_createdUpdata.init(1)
- })
- },
- link_task(id) {
- const bizId_id = EncryptId(`${this.bizId}_${id}`)
- if (localStorage.getItem('openPageHandle') === 'self') {
- this.$router.push({ name: '任务详情', query: { bizId_id: bizId_id }})
- } else {
- const newTab = this.$router.resolve({
- name: '任务详情',
- query: { bizId_id: bizId_id }
- })
- window.open(newTab.href, '_blank')
- }
- },
- query_Reset() {
- // 重置
- this.form_task = {
- ...this.form_task,
- notest: '',
- bizId: '',
- status: '',
- stage: '',
- id: '',
- projectId: '',
- requireId: '',
- PersonInCharge: '',
- Participant: '',
- creater: '',
- isFromDpm: '',
- priority: '',
- date: []
- }
- if (this.nowTab === 'charts') {
- this.form_task = { ...this.form_task, name: '', statusList: [] }
- }
- this.updateChartSearchFormValue()
- if (this.nowTab === 'charts') {
- this.get_charts()
- } else {
- this.get_taskList()
- }
- },
- handleSizeChange(size) {
- // 分页
- this.pageSize = size
- this.isToOne = false
- this.form_taskHandle()
- if (this.nowTab === 'charts') {
- this.get_chartListDetial()
- return
- }
- this.get_taskList(1)
- },
- handleCurrentChange(curIndex) {
- // 分页
- this.curIndex = curIndex
- this.currentPage = curIndex
- this.isToOne = false
- this.form_taskHandle()
- if (this.nowTab === 'charts') {
- this.get_chartListDetial()
- return
- }
- this.get_taskList()
- },
- async get_taskSelect() {
- if (this.bizId === -1) return
- // 下拉菜单数据
- const res = await configShowTaskEnum()
- if (res.code === 200) {
- const healthStage = res.data.taskStage.map((t) => ({
- ...t,
- label: t.msg,
- value: t.code
- }))
- this.healthStage = healthStage
- this.updateChartSlectOption('stage', healthStage)
- this.noTest = res.data.noTest // 是否免测
- this.taskSource = res.data.taskSource // 归属需求
- this.appClient = res.data.appClient // 涉及客户端
- }
- const res1 = await configShowTaskStatusEnum(this.bizId)
- if (res1.code === 200) {
- const daStatus = res1.data.taskStatus.map((t) => ({
- ...t,
- label: t.msg,
- value: t.code
- }))
- this.daStatus = daStatus
- this.updateChartSlectOption('statusList', daStatus)
- }
- const res2 = await projectListProject({ bizId: this.bizId })
- if (res2.code === 200) {
- const projectList = res2.data.map((t) => ({
- ...t,
- label: t.name,
- value: t.id
- }))
- this.projectList = projectList
- this.updateChartSlectOption('projectId', projectList)
- }
- },
- bugDataGet() {
- // 所属模块
- this.biz = this.bizId
- if (this.bizId === -1) {
- this.biz = this.$store.state.global.bizId
- }
- settingQueryBizModuleList(this.biz).then((res) => {
- this.business_platform_Modular = this.getRequireData(res.data)
- })
- },
- getRequireData(data) {
- for (let i = 0; i < data.length; i++) {
- data[i].childModules && data[i].childModules.length < 1
- ? delete data[i].childModules
- : this.getRequireData(data[i].childModules)
- }
- return data
- },
- async getFilterItem(filterId) {
- // 获取单个过滤器
- const res = await filterGetFilter(filterId)
- if (res.code === 200) {
- const filter = JSON.parse(res.data.content)
- Object.assign(this.form_task, filter)
- this.curIndex = 1
- this.get_taskList()
- }
- },
- chartSearchFormChange(key, value) {
- this.form_task[key] = value
- },
- updateChartSlectOption(key, option) {
- this.chartSearchFormRenderData.map((t) => {
- if (t.key === key) {
- t.option = option
- }
- })
- },
- updateChartSearchFormValue() {
- this.chartSearchFormRenderData.map((t) => {
- t.value = this.form_task[t.key]
- })
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .chartView {
- .chartSearchTitle {
- width: 50px;
- color: #333333;
- font-size: 14px;
- }
- .screen {
- margin-left: 20px;
- }
- }
- .stylus-head {
- position: relative;
- }
- .new-tab-open {
- position: absolute;
- left: 120px;
- }
- .filter {
- display: flex;
- justify-content: space-between;
- align-items: baseline;
- margin-top: 15px;
- .filterWrap {
- display: flex;
- align-items: baseline;
- .title {
- width: 100px;
- }
- .itemBox {
- .itemFilter {
- display: inline-block;
- margin-right: 20px;
- margin-bottom: 10px;
- cursor: pointer;
- }
- }
- }
- .btn {
- font-size: 14px;
- color: #00a0ff;
- cursor: pointer;
- min-width: 80px;
- text-align: center;
- }
- }
- .subtitle {
- color: #333;
- font-size: 16px;
- background: #fff;
- font-weight: 700;
- padding: 16px 12px;
- }
- .search_box {
- .item {
- // width: 270px;
- margin-right: 15px;
- .queryName {
- min-width: 80px;
- }
- }
- }
- </style>
- <style>
- .el-loading-mask {
- z-index: 8;
- }
- .requirement-xx .el-table .cell {
- padding: 5px 0;
- font-size: 14px;
- font-family: MicrosoftYaHei;
- }
- .requirement-xx .el-table .el-table__body tr:hover td {
- color: #409eff;
- background: #edf6ff;
- } /*hover时字体, 背景颜色*/
- .footer {
- text-align: right;
- margin: 1%;
- background-color: #ffffff;
- border-radius: 4px;
- }
- .bgborder .el-table .cell {
- box-sizing: border-box;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- line-height: 23px;
- padding-right: 10px;
- margin: -6px 0 -2px 0 !important;
- }
- .el-table .warning-row {
- background: oldlace;
- }
- .drop_down {
- font-size: 14px;
- color: #333333;
- }
- .requirement_el-dropdown-menu {
- max-height: 300px !important;
- max-width: 200px;
- overflow: auto !important;
- }
- .el-dropdown-menu__item:not(.is-disabled):hover {
- background-color: #f6f7fa;
- color: #606266;
- }
- .div_priority {
- display: inline-block;
- width: 38px;
- text-align: center;
- line-height: 24px;
- font-size: 14px;
- color: #fff;
- border-radius: 4px;
- margin-right: 30px;
- }
- .tagNotification {
- background: rgba(255, 137, 82, 15%);
- color: #ff8952;
- padding: 0 5px;
- border-radius: 8px;
- margin-left: 10px;
- }
- .tagNotification1 {
- background: rgba(245, 108, 108, 17%);
- color: #f56c6c;
- padding: 0 5px;
- border-radius: 8px;
- margin-left: 10px;
- }
- </style>
- <style lang="less" scoped>
- .stylus-head /deep/ .el-form-item__label {
- color: #333333;
- font-weight: 400;
- }
- .stylus-content /deep/ .el-table .el-table__body tr:hover td {
- // color #409EFF !important
- background: #EDF6FF;
- }
- .stylus-head /deep/ .el-divider--horizontal {
- margin: 10px 0;
- }
- .stylus-head /deep/ .el-form-item {
- margin-bottom: 0;
- }
- .stylus-head {
- width: 100%;
- padding: 15px;
- margin-bottom: 10px;
- background-color: white;
- border-radius: 4px;
- .stylus-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .stylus-more {
- background: rgba(252, 252, 252, 1);
- border-radius: 4px;
- padding: 15px;
- min-height: 100px;
- margin-top: 22px;
- border: 1px solid rgba(238, 238, 238, 1);
- width: 100%;
- }
- }
- .stylus-content {
- width: 100%;
- padding: 0.3% 1% 1% 1%;
- margin: 0 auto;
- background-color: white;
- border-radius: 4px;
- // min-height: calc(100vh - 143px);
- .stylus-hover:hover {
- color: #409EFF !important;
- cursor: pointer;
- }
- }
- </style>
|