12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442 |
- <template>
- <div class="app-container planTask">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="120px"
- >
- <el-form-item prop="type">
- <el-select v-model="queryParams.type" placeholder="请选择计划类型">
- <!-- <el-option
- v-for="(item, i) in ziDian"
- :key="i"
- :label="item.dictLabel"
- :value="item.dictLabel"
- >
- </el-option> -->
- <el-option label="周计划" value="week"></el-option>
- <el-option label="月计划" value="month"></el-option>
- <el-option label="年计划" value="year"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="executableUnit">
- <el-select
- v-model="queryParams.executableUnit"
- placeholder="请选择执行单位"
- >
- <el-option label="大队" value="productionBrigade"></el-option>
- <el-option label="发射一营" value="launch1"></el-option>
- <el-option label="发射二营" value="launch2"></el-option>
- <el-option label="发射三营" value="launch3"></el-option>
- <el-option label="发射四营" value="launch4"></el-option>
- <el-option label="技术部" value="technology"></el-option>
- <el-option label="后勤部" value="logistics"></el-option>
- <el-option label="后勤营一连" value="logistics1"></el-option>
- <el-option label="后勤营二连" value="logistics2"></el-option>
- <el-option label="后勤营三连" value="logistics3"></el-option>
- <el-option label="参谋部" value="adviser"></el-option>
- <el-option label="保障部" value="safeguard"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="unitId">
- <el-select v-model="queryParams.unitId" placeholder="请选择发布单位">
- <el-option label="大队" value="productionBrigade"></el-option>
- <el-option label="发射一营" value="launch1"></el-option>
- <el-option label="发射二营" value="launch2"></el-option>
- <el-option label="发射三营" value="launch3"></el-option>
- <el-option label="发射四营" value="launch4"></el-option>
- <el-option label="技术部" value="technology"></el-option>
- <el-option label="后勤部" value="logistics"></el-option>
- <el-option label="后勤营一连" value="logistics1"></el-option>
- <el-option label="后勤营二连" value="logistics2"></el-option>
- <el-option label="后勤营三连" value="logistics3"></el-option>
- <el-option label="参谋部" value="adviser"></el-option>
- <el-option label="保障部" value="safeguard"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- icon="el-icon-refresh"
- size="mini"
- @click="resetQuery"
- >重置</el-button
- >
- </el-form-item>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['workingArrangements:planTask:add']"
- >新增</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['workingArrangements:planTask:edit']"
- >修改</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- plain
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['workingArrangements:planTask:remove']"
- >删除</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- :loading="exportLoading"
- @click="handleExport"
- v-hasPermi="['workingArrangements:planTask:export']"
- >导出</el-button
- >
- </el-col>
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- </el-row>
- <el-table
- v-loading="loading"
- :data="planTaskList"
- @selection-change="handleSelectionChange"
- :header-cell-style="{ background: '#003C69', color: 'white' }"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="名称" align="center" prop="name" />
- <el-table-column
- label="发布单位"
- align="center"
- prop="unitName"
- :formatter="unit3Format"
- />
- <el-table-column
- label="计划类型"
- align="center"
- prop="type"
- :formatter="unit4Format"
- />
- <el-table-column
- label="执行人"
- align="center"
- prop="peopleId"
- :formatter="unit2Format"
- />
- <el-table-column
- label="计划开始时间"
- align="center"
- prop="startTime"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="计划结束时间"
- align="center"
- prop="endTime"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="计划描述"
- align="center"
- prop="contents"
- class="discrible"
- show-overflow-tooltip
- />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- width="300"
- >
- <template slot-scope="scope">
- <el-button
- size="btlook"
- type="text"
- @click="ViewProgress(scope.row)"
- v-if="scope.row.common == 1"
- >
- <span>进度录入</span>
- </el-button>
- <el-button
- size="btlook"
- type="text"
- @click="handleChakan(scope.row)"
- v-if="scope.row.common == 1"
- >
- <!-- 单人进度 -->
- <span class="chakan">查看</span>
- </el-button>
- <el-button
- size="btlook"
- type="text"
- @click="handleChakan1(scope.row)"
- v-if="scope.row.common == 2 || scope.row.common == 0"
- >
- <!-- 多人进度 -->
- <span class="chakan">进度查看</span>
- </el-button>
- <el-button
- size="btu"
- type="text"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['workingArrangements:planTask:edit']"
- v-if="scope.row.common == 2"
- >修改</el-button
- >
- <el-button
- size="btd"
- type="text"
- @click="handleDelete(scope.row)"
- v-if="scope.row.common == 2"
- v-hasPermi="['workingArrangements:planTask:remove']"
- >删除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改工作计划对话框 -->
- <el-dialog
- :title="title"
- :visible.sync="open"
- width="990px"
- append-to-body
- class="el-dialog__header"
- >
- <el-form
- ref="form"
- :model="form"
- :rules="rules"
- label-width="100px"
- :inline="true"
- >
- <div class="jiben">基本信息</div>
- <el-form-item label="计划名称" prop="executorName">
- <el-input
- label="计划名称"
- v-model="form.name"
- placeholder="请输入计划名称"
- @click.native="planName"
- />
- </el-form-item>
- <el-form-item label="任务编号" prop="number">
- <el-input
- label="任务编号"
- v-model="form.number"
- :disabled="true"
- class="ipt"
- >
- </el-input>
- </el-form-item>
- <el-form-item label="发布单位" prop="unitName">
- <treeselect
- v-model="form.adminId"
- :options="part"
- placeholder="选择单位"
- @select="selectPeo"
- class="threeselects"
- />
- </el-form-item>
- <el-form-item label="执行单位" prop="unitName2">
- <treeselect
- v-model="form.unitId"
- :options="users"
- placeholder="请选择执行单位"
- class="threeselects"
- @select="selectPeo1"
- />
- </el-form-item>
- <el-form-item label="计划类型" prop="type" class="change_plan_type">
- <el-select
- v-model="queryParams.type"
- placeholder="请选择计划类型"
- ref="dict"
- clearable
- size="small"
- >
- <el-option
- v-for="dict in dict.type.plan_type"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- @click.native="chooseplan"
- />
- </el-select>
- </el-form-item>
- <div>
- <el-form-item label="执行人" prop="peopleName" label-width="100px">
- <div>
- <el-select
- multiple
- v-model="form.peopleName"
- placeholder="请选择执行人"
- id="execute"
- ref="peoplenames"
- >
- <el-option
- v-for="item in executor"
- :key="item.deptId"
- :label="item.nickName"
- :value="item.userId"
- id="execute"
- @click.native="returnExecutor(item.deptId, item.nickName)"
- />
- </el-select>
- </div>
- </el-form-item>
- </div>
- <el-form-item label="开始时间" prop="startTime">
- <el-date-picker
- clearable
- size="small"
- v-model="form.startTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择计划开始时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="结束时间" prop="endTime">
- <el-date-picker
- clearable
- size="small"
- v-model="form.endTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择计划结束时间"
- style="width: 200px"
- >
- </el-date-picker>
- </el-form-item>
- <div class="jiben">计划附件</div>
- <el-form-item style="margin-left: 30px">
- <fileUpload v-model="form.file" />
- </el-form-item>
- <div class="jiben">计划描述</div>
- <el-form-item prop="contents">
- <el-input
- v-model="form.contents"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item>
- <div class="jiben">备注</div>
- <el-form-item prop="remark">
- <el-input
- v-model="form.remark"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 进度录入弹框 -->
- <el-dialog
- :title="title"
- :visible.sync="open1"
- width="980px"
- append-to-body
- class="el-dialog__header"
- >
- <el-form
- ref="Progress"
- :model="Progress"
- :rules="rules1"
- label-width="100px"
- :inline="true"
- >
- <div class="jiben">完成进度</div>
- <el-form-item prop="planProgress">
- <!-- <el-input
- label="计划名称"
- v-model="Progress.comPlan"
- class="big"
- @change="comPlan"
- /> -->
- <div>
- <el-input-number
- v-model="Progress.planProgress"
- controls-position="right"
- :min="0"
- :max="100"
- ></el-input-number>
- <el-progress
- :text-inside="true"
- :stroke-width="24"
- :percentage="Progress.planProgress"
- color="rgba(41, 231, 205, 1)"
- class="jinduProgress"
- ></el-progress>
- </div>
- </el-form-item>
- <!-- <div class="jiben">任务周期</div>
- <el-form-item prop="comWeek">
- <el-input label="计划名称" v-model="Progress.comWeek" class="big" />
- </el-form-item> -->
- <!-- <div class="jiben">任务完成状态</div>
- <el-progress
- :text-inside="true"
- :stroke-width="30"
- :percentage="Progress.statu"
- style="height: 50px"
- ></el-progress> -->
- <!-- <div class="jiben">附件文档</div>
- <el-form-item prop="file">
- <el-input label="计划名称" v-model="Progress.file" class="big" />
- </el-form-item> -->
- <div class="jiben">附件</div>
- <el-form-item>
- <fileUpload v-model="Progress.file" />
- </el-form-item>
- <div class="jiben">备注</div>
- <el-form-item prop="remark">
- <el-input
- v-model="Progress.remark"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item>
- <!-- <div class="jiben">计划描述</div>
- <el-form-item prop="contents">
- <el-input
- v-model="Progress.contents"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item> -->
- <div class="jiben">完成时间</div>
- <el-form-item prop="accomplishTime">
- <el-date-picker
- class="comtimer"
- clearable
- size="small"
- v-model="Progress.accomplishTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择完成时间"
- >
- </el-date-picker>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm1">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 进度查看弹框 -->
- <el-dialog
- :title="title"
- :visible.sync="open2"
- width="980px"
- append-to-body
- class="el-dialog__header"
- >
- <el-form
- ref="singleTable"
- :model="singleTable"
- :rules="rules"
- label-width="100px"
- :inline="true"
- >
- <div class="jiben">完成进度</div>
- <!-- <el-form-item prop="comPlan"> -->
- <!-- <el-input
- label="计划名称"
- v-model="ProgressLook.comPlan"
- class="big"
- /> -->
- <!-- </el-form-item> -->
- <el-progress
- :text-inside="true"
- :stroke-width="24"
- :percentage="singleTable.planProgresses"
- style="margin-bottom: 20px"
- color="rgba(41, 231, 205, 1)"
- ></el-progress>
- <div class="jiben">任务周期</div>
- <el-form-item prop="comWeek">
- <!-- <el-input
- v-model="singleTable."
- class="big"
- /> -->
- <div class="thistext">
- {{ singleTable.startTime }} 至 {{ singleTable.endTime }}
- </div>
- </el-form-item>
- <!-- <div class="thistext"></div> -->
- <div class="jiben">附件文档</div>
- <el-form-item prop="file">
- <el-input
- label="附件名称"
- v-model="singleTable.fileName"
- style="width: 820px"
- />
- <!-- <div>{{singleTableb.fileName}}</div> -->
- <a
- :href="singleTable.file"
- download
- title="下载"
- style="color: white; margin-left: 10px"
- class="downloadfile"
- >下载附件</a
- >
- </el-form-item>
- <!-- <a :href="singleTable.planProgress.file" style="color:white">下载附件</a> -->
- <div class="jiben">备注</div>
- <!-- <el-form-item prop="remark">
- <el-input
- v-model="ProgressLook.remark"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item> -->
- <div class="thistext">{{ singleTable.remark }}</div>
- <div class="jiben">任务描述</div>
- <!-- <el-form-item prop="contents">
- <el-input
- v-model="ProgressLook.contents"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item> -->
- <div class="thistext">{{ singleTable.contents }}</div>
- <!-- <div class="jiben">执行人信息</div>
- <el-table
- :data="tableData"
- border
- style="width: 100%; background: #004d86"
- >
- <el-table-column prop="date" label="执行人" width="180">
- </el-table-column>
- <el-table-column prop="name" label="任务周期" width="180">
- </el-table-column>
- <el-table-column prop="address" label="进度"></el-table-column>
- <el-table-column prop="date" label="完成时间" width="180">
- </el-table-column>
- <el-table-column prop="name" label="状态" width="180">
- </el-table-column>
- <el-table-column prop="address" label="下载"></el-table-column>
- </el-table> -->
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm2">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <!-- 进度查看1弹框 -->
- <el-dialog
- :title="title"
- :visible.sync="open3"
- width="980px"
- append-to-body
- class="el-dialog__header"
- >
- <el-form
- ref="moreTable"
- :model="moreTable"
- :rules="rules"
- label-width="100px"
- :inline="true"
- >
- <div class="jiben">完成进度</div>
- <el-progress
- :text-inside="true"
- :stroke-width="24"
- :percentage="comstatus"
- style="margin-bottom: 20px"
- color="rgba(41, 231, 205, 1)"
- ></el-progress>
- <div class="jiben">任务周期</div>
- <!-- <el-form-item prop="comWeek">
- <el-input
- label="计划名称"
- v-model="moreTable.startTime"
- class="big"
- :disabled="true"
- />
- </el-form-item> -->
- <div class="thistext">
- {{ moreTable.startTime }} 至 {{ moreTable.endTime }}
- </div>
- <!-- <div class="thistext"></div> -->
- <div class="jiben">附件文档</div>
- <el-form-item prop="file">
- <!-- <el-input label="计划名称" v-model="ProgressLook.file" class="big" /> -->
- <!-- <a :href="moreTable.file" download title="下载" style="color:white;margin-left:10px">下载附件</a> -->
- <el-input
- label="附件名称"
- v-model="singleTable.fileName"
- style="width: 820px"
- />
- <!-- <div>{{singleTableb.fileName}}</div> -->
- <a
- :href="moreTable.file"
- download
- title="下载"
- style="color: white; margin-left: 10px"
- class="downloadfile"
- >下载附件</a
- >
- </el-form-item>
- <div class="jiben">备注</div>
- <!-- <el-form-item prop="remark">
- <el-input
- v-model="ProgressLook.remark"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item> -->
- <div class="thistext">{{ moreTable.remark }}</div>
- <div class="jiben">任务描述</div>
- <!-- <el-form-item prop="contents">
- <el-input
- v-model="ProgressLook.contents"
- type="textarea"
- placeholder="请输入内容"
- />
- </el-form-item> -->
- <div class="thistext">{{ moreTable.contents }}</div>
- <div class="jiben">执行人信息</div>
- <el-table
- :data="moreTable.planProgresses"
- border
- style="width: 100%; background: #004d86"
- class="tabless"
- >
- <el-table-column prop="peopleName" label="执行人" width="180">
- </el-table-column>
- <el-table-column label="任务周期" width="190">
- <template slot-scope="scope">
- <div>{{ scope.row.taskCycle }}</div>
- </template>
- </el-table-column>
- <el-table-column prop="schedule" label="进度">
- <template slot-scope="scope">
- <el-progress
- :text-inside="true"
- :stroke-width="24"
- :percentage="scope.row.schedule"
- style="margin-bottom: 20px"
- color="rgba(41, 231, 205, 1)"
- ></el-progress>
- </template>
- </el-table-column>
- <el-table-column prop="accomplishTime" label="完成时间" width="180">
- </el-table-column>
- <el-table-column label="状态" width="180">
- <template slot-scope="scope">
- <div>{{ scope.row.schedule == 100 ? "完成" : "未完成" }}</div>
- </template>
- </el-table-column>
- <el-table-column prop="address" label="下载">
- <template slot-scope="scope">
- <a :href="scope.row.file" download>下载附件</a>
- </template>
- </el-table-column>
- </el-table>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm2">确 定</el-button>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listPlanTask,
- getPlanTask,
- delPlanTask,
- addPlanTask,
- updatePlanTask,
- exportPlanTask,
- singProgress,
- moreProgress,
- uploadProgress,
- } from "@/api/workingArrangements/planTask";
- import { getDicts } from "@/api/system/dict/data";
- import {
- deptUser,
- allUser,
- getDept,
- getDeptList,
- } from "@/api/workingArrangements/workTask";
- import Treeselect from "@riophae/vue-treeselect";
- import "@riophae/vue-treeselect/dist/vue-treeselect.css";
- import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
- export default {
- name: "PlanTask",
- dicts: ["plan_type"],
- components: { Treeselect },
- data() {
- return {
- // 遮罩层
- loading: true,
- // 导出遮罩层
- exportLoading: false,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 工作计划表格数据
- planTaskList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 显示进度录入框
- open1: false,
- // 显示进度查看框
- open2: false,
- // 显示多人进度查看框
- open3: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- name: null,
- peopleId: null,
- number: null,
- startTime: null,
- endTime: null,
- file: null,
- fileName: null,
- contents: null,
- adminId: null,
- unitId: null,
- unitName: null,
- createtime: null,
- updatetime: null,
- type: null,
- peopleName: null,
- unitName2: null,
- taskProgress: null,
- releaseUnit: null,
- executableUnit: null,
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- number: [{ required: true, message: "编号不能为空", trigger: "blur" }],
- peopleName: [
- { required: true, message: "执行人不能为空", trigger: "blur" },
- ],
- // unitName:{required:true,message:"发布单位不能为空",trigger:"blur"},
- // unitName2:{required:true,message:"执行单位不能为空",trigger:"blur"},
- // name:[{required:true,message:"计划名称不能为空",trigger:"blur"}]
- },
- rules1: {
- planProgress: [
- { required: true, message: "请输入完成进度", trigger: "blur" },
- ],
- },
- // 获取部门列表
- part: [],
- // 获取执行单位
- ExecutableUnit: [],
- // 执行人
- executor: [],
- // 发布单位id
- issueUnit: [],
- // 执行人姓名
- executorName: [],
- // 执行单位id
- executableUnitId: [],
- rylist: [],
- // 部门列表
- getdeptList: [],
- // 进度录入参数
- Progress: {
- schedule: "",
- file: "",
- remark: "",
- accomplishTime: "",
- },
- // 进度查看参数
- ProgressLook: {},
- // 查询字典
- dictType: {
- dictType: "plan_type",
- },
- // 执行单位列表
- users: [],
- // 字典
- ziDian: [],
- // 进度查看
- tableData: [],
- // 单人进度查看列表
- singleTable: [],
- // 多人进度查看列表
- moreTable: [],
- // 进度录入id
- jinduId: "",
- // 进度表格
- jinduTable: [],
- partsp: null,
- comstatus: 0,
- };
- },
- created() {
- this.getList();
- this.getdept();
- allUser().then((res) => {
- this.rylist = res.rows;
- });
- this.getdict();
- this.chooseplan();
- getDeptList().then((res) => {
- this.getdeptList = res.data;
- console.log(this.getdeptList);
- });
- },
- methods: {
- comPlan() {
- if (this.Progress.comPlan > 100) {
- this.Progress.comPlan = 0;
- alert("完成进度不能大于100");
- return;
- } else {
- this.Progress.statu = this.Progress.comPlan;
- console.log("输入成功");
- }
- },
- // 获取执行人
- getZhuChi(id) {
- deptUser(id).then((res) => {
- // this.renYuan = res.data;
- this.executor = res.data;
- });
- },
- // 发布单位选中触发
- selectPeo(val) {
- this.form.adminId = val.id;
- this.getZhuChi(this.form.adminId);
- },
- // 执行单位选中触发
- selectPeo1(val) {
- this.form.unitId = val.id;
- this.form.peopleName = "";
- this.getZhuChi(this.form.unitId);
- },
- // 查询计划类型
- getdict() {
- getDicts(this.dictType.dictType).then((res) => {
- this.ziDian = res.data;
- });
- },
- /** 查询工作计划列表 */
- getList() {
- this.loading = true;
- listPlanTask(this.queryParams).then((response) => {
- this.planTaskList = response.rows;
- console.log(this.planTaskList);
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.comstatus = 0;
- this.reset();
- this.open1 = false;
- this.open2 = false;
- this.open3 = false;
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- name: null,
- peopleId: null,
- number: null,
- startTime: null,
- endTime: null,
- file: null,
- fileName: null,
- remark: null,
- contents: null,
- adminId: null,
- unitId: null,
- unitName: null,
- createtime: null,
- updatetime: null,
- type: null,
- peopleName: null,
- unitName2: null,
- taskProgress: null,
- releaseUnit: null,
- executableUnit: null,
- };
- this.Progress = {
- schedule: "",
- file: "",
- remark: "",
- accomplishTime: "",
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- console.log(this.multiple);
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加工作计划";
- // 获取执行单位列表
- getDept2().then((res) => {
- // console.log(res,2)
- this.users = res.data;
- console.log(this.users);
- });
- this.getdict();
- },
- /** 进度录入按钮操作 */
- ViewProgress(row) {
- // this.reset();
- this.open1 = true;
- this.title = "进度录入";
- this.jinduId = row.id;
- singProgress(this.jinduId).then((res) => {
- console.log(res.data);
- this.Progress.id = res.data.planProgress.id;
- this.Progress.taskId = res.data.id;
- this.Progress.planProgress = res.data.planProgress.schedule;
- console.log(this.Progress.planProgress.schedule);
- });
- },
- // 进度查看单人进度
- handleChakan(row) {
- this.reset();
- this.open2 = true;
- this.title = "进度查看";
- // 获取当前行的id
- singProgress(row.id).then((res) => {
- this.singleTable = res.data;
- this.singleTable.planProgresses =
- this.singleTable.planProgress.schedule;
- console.log(this.singleTable);
- // this.singleTable.jindu=singleTable.planProgress.schedule
- // console.log(this.singleTable)
- });
- },
- // 多人进度查看
- handleChakan1(row) {
- this.reset();
- this.open3 = true;
- this.title = "进度查看";
- // 获取当前行的id
- // console.log(row.id)
- moreProgress(row.id).then((res) => {
- this.moreTable = res.data;
- console.log(this.moreTable);
- this.moreTable.planProgresses.forEach((item) => {
- this.comstatus +=
- item.schedule / this.moreTable.planProgresses.length;
- // this.comstatus=0
- });
- });
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- getDept2().then((res) => {
- // console.log(res,2)
- this.users = res.data;
- console.log(this.users);
- });
- const id = row.id || this.ids;
- getPlanTask(id).then((response) => {
- this.form = response.data;
- // this.getDept2()
- this.getZhuChi(this.form.unitId);
- this.form.peopleName = this.form.peopleName.split(",").map(Number);
- this.open = true;
- this.title = "修改工作计划";
- });
- },
- unit2Format(row, column) {
- var deptName = "";
- if (
- parseInt(this.planTaskList[0].common) == 1 ||
- this.planTaskList[0].common == 2
- ) {
- this.rylist.map((item) => {
- row.peopleName.split(",").forEach((items, index) => {
- if (item.userId == items) {
- deptName += item.nickName + " ";
- }
- });
- });
- } else if (parseInt(this.planTaskList[0].common) == 0) {
- this.rylist.map((item) => {
- row.peopleName.split(",").forEach((items, index) => {
- if (item.userId == items) {
- deptName += item.nickName + " ";
- }
- });
- });
- }
- return deptName;
- },
- unit3Format(row, column) {
- var deptName = "";
- // console.log(this.planTaskList[0])
- if (
- parseInt(this.planTaskList[0].common) == 1 ||
- this.planTaskList[0].common == 2
- ) {
- this.getdeptList.map((item) => {
- if (item.deptId == row.adminId) {
- deptName = item.deptName;
- }
- });
- } else if (parseInt(this.planTaskList[0].common) == 0) {
- console.log(this.part);
- this.part[0].children.map((item) => {
- if (item.id == row.adminId) {
- deptName = item.label;
- }
- });
- }
- return deptName;
- },
- unit4Format(row, column) {
- var deptName = "";
- this.ziDian.map((item) => {
- if (item.dictSort == row.type) {
- deptName = item.dictLabel;
- }
- });
- return deptName;
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.adminId === this.form.unitId) {
- alert("发布单位和执行单位不能相同");
- } else {
- this.form.peopleName = this.form.peopleName.join(",");
- this.form.peopleId = this.form.peopleName;
- console.log(this.form);
- if (this.form.id != null) {
- updatePlanTask(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addPlanTask(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- }
- });
- },
- submitForm1() {
- this.$refs["Progress"].validate((valid) => {
- if (valid) {
- console.log(this.jinduId);
- this.Progress.schedule = this.Progress.planProgress;
- uploadProgress(this.Progress).then((res1) => {
- console.log(res1);
- this.$modal.msgSuccess("上传成功");
- // this.Progress
- this.reset();
- this.open1 = false;
- this.getList();
- });
- }
- });
- },
- submitForm2() {
- this.comstatus = 0;
- this.open2 = false;
- this.open3 = false;
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm('是否确认删除工作计划编号为"' + ids + '"的数据项?')
- .then(function () {
- return delPlanTask(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$modal
- .confirm("是否确认导出所有工作计划数据项?")
- .then(() => {
- this.exportLoading = true;
- return exportPlanTask(queryParams);
- })
- .then((response) => {
- this.$download.name(response.msg);
- this.exportLoading = false;
- })
- .catch(() => {});
- },
- // 发布单位接口
- getdept() {
- getDept().then((res) => {
- this.part = res.data;
- });
- },
- // 发送执行人列表
- returnExecutor(id, name) {
- console.log(this.form.peopleName);
- },
- // 计划编号
- planName() {
- let date = new Date();
- let year = date.getFullYear();
- let month =
- date.getMonth() + 1 <= 9
- ? "0" + (date.getMonth() + 1)
- : date.getMonth() + 1;
- let day = date.getDate();
- let hour = date.getHours() <= 9 ? "0" + date.getHours() : date.getHours();
- let minute =
- date.getMinutes <= 9 ? "0" + date.getMinutes() : date.getMinutes();
- this.form.number = year + month + day + hour + minute;
- },
- // 获取发布单位id
- issueunit(id) {
- this.form.adminId = id;
- },
- // 选择计划
- chooseplan() {
- this.form.type = this.queryParams.type;
- },
- },
- };
- </script>
- <style>
- .el-input__inner {
- height: 36px;
- line-height: 36px;
- background-color: #00365f;
- color: #fff;
- }
- .el-select-dropdown {
- background-color: white;
- }
- .el-dialog__wrapper .el-form-item__label {
- color: white !important;
- }
- .el-dialog {
- background-color: #004d86 !important;
- }
- .el-form-item__label {
- width: 30%;
- }
- .el-textarea {
- width: 70%;
- }
- .el-dialog__title {
- color: white;
- }
- .el-dialog__header {
- border-bottom: 1px solid #718a9d;
- }
- .el-textarea__inner {
- width: 945px;
- height: 104px;
- }
- /* 表宽度 */
- .el-input {
- width: 200px;
- }
- .serialNumber {
- border: 1px solid white;
- border-radius: 5px;
- width: 200px;
- text-indent: 1em;
- color: white;
- line-height: 36px;
- }
- .el-date-editor.el-input,
- .el-date-editor {
- width: 200px;
- }
- /* 执行 */
- #execute {
- width: 510px;
- /* width: auto; */
- }
- .el-input--suffix {
- width: auto;
- }
- /* 计划附件 */
- .el-upload__tip {
- position: absolute;
- top: -5px;
- width: 500px;
- left: 100px;
- color: white;
- }
- /* 上传附件样式 */
- .el-icon-document {
- padding: 3px 5px;
- color: white;
- }
- .el-upload-list__item:hover {
- background-color: #00365f;
- }
- /* 上传附件的删除按钮样式 */
- .el-link--inner {
- margin-left: 3px;
- }
- .el-select-dropdown__item:hover {
- color: #1890ff !important;
- }
- /* 下拉框的颜色 */
- .el-scrollbar li {
- background-color: white;
- color: black;
- }
- .el-scrollbar li:hover {
- background-color: #00365f;
- color: white;
- }
- .el-select-dropdown__wrap .el-scrollbar__view {
- background-color: white;
- }
- /* 修改计划类型样式 */
- .el-input--small .el-input__inner {
- height: 36px;
- line-height: 36px;
- }
- .el-input--medium .el-input__inner {
- background-color: rgba(0, 0, 0, 0);
- }
- /* 修改编号样式 */
- .ipt .el-input__inner {
- background-color: #004d86 !important;
- }
- /* 进度查看 */
- .el-button--btlook.is-active,
- .el-button--btlook:active {
- background: #32a5d3;
- border-color: #32a5d3;
- color: #ffffff;
- }
- .el-button--btlook:focus,
- .el-button--btlook:hover {
- background: #32a5d3;
- border-color: #32a5d3;
- color: #ffffff;
- }
- .el-button--btlook {
- width: 70px !important;
- border: 1px solid transparent;
- padding: 3px 8px;
- font-size: 14px;
- line-height: 1.5;
- border-radius: 3px;
- color: #fff;
- background-color: #32a5d3;
- }
- .big .el-input__inner {
- width: 940px;
- }
- /* 树形 */
- .threeselects {
- width: 200px;
- }
- .threeselects .vue-treeselect__input {
- background-color: #004d86;
- /* color: white; */
- }
- .el-form-item__content {
- /* color: white; */
- border-bottom: 1px solid #004d86;
- }
- .vue-treeselect__control {
- background-color: #004d86;
- border-bottom: 1px solid white;
- /* color: whi; */
- /* color: white; */
- }
- .vue-treeselect__placeholder {
- color: white;
- }
- .change_plan_type .el-input__inner {
- width: 200px;
- }
- /* 表格样式 */
- .el-table__empty-block {
- background-color: #004d86;
- }
- .el-table {
- background-color: #004d86;
- }
- .comtimer .el-input__inner {
- width: 940px;
- }
- /* 备注 */
- .thistext {
- color: white;
- width: 940px;
- border: 1px solid #fff;
- border-radius: 4px;
- height: auto;
- line-height: 36px;
- text-indent: 1em;
- margin-bottom: 20px;
- /* margin: auto; */
- }
- /* 完成进度 */
- .complue .el-input__inner {
- width: 940px;
- }
- .complue {
- width: 940px;
- }
- /* 进度 */
- .jinduProgress {
- width: 740px;
- position: absolute;
- left: 210px;
- top: 5px;
- }
- /* 表格 */
- .tabless .el-table__row {
- background-color: #004d86;
- }
- .tabless table {
- border: 1px solid white;
- }
- .has-gutter {
- background-color: #004d86;
- }
- .el-table tr:nth-child(odd) {
- background-color: #004d86;
- }
- .el-table tr:nth-child(even) {
- background-color: #004d86;
- }
- /* 下载按钮 */
- .downloadfile {
- border: 1px solid white;
- display: inline-block;
- width: 100px;
- height: 33px;
- border-radius: 5px;
- line-height: 33px;
- text-align: center;
- }
- .el-table__row {
- border-bottom: 1px solid white;
- }
- .el-input-number__increase {
- background-color: #004d86;
- }
- .el-input-number__decrease {
- background-color: #004d86;
- }
- /* 进度条百分比 */
- .el-progress-bar__innerText {
- color: #004d86;
- /* font-weight: 200; */
- }
- .el-progress-bar__outer {
- background-color: rgba(25, 98, 153, 1);
- }
- /* 上下箭头 */
- .el-icon-arrow-up,
- .el-icon-arrow-down {
- color: white;
- }
- .vue-treeselect__single-value {
- color: white;
- }
- /* 文字多余部分省略 */
- .el-table__cell .cell {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- </style>
|