123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- size="small"
- :inline="true"
- v-show="showSearch"
- label-width="68px"
- >
- <el-form-item label="" prop="taskName">
- <el-input
- v-model="queryParams.taskName"
- placeholder="请输入任务名称"
- clearable
- @input="handleQuery"
- />
- </el-form-item>
- <el-form-item>
- <!-- <el-button
- type="primary"
- icon="el-icon-search"
- size="mini"
- @click="handleQuery"
- >搜索</el-button
- > -->
- <el-button icon="el-icon-refresh" type="btr" @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:worktaskplan: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:worktaskplan: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:worktaskplan:remove']"
- >删除</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['workingArrangements:worktaskplan:export']"
- >导出</el-button
- >
- </el-col>
- </el-row>
- <el-table
- v-loading="loading"
- :data="worktaskplanList"
- @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">
- <template scope="scope">
- <span>{{
- (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="任务名称" align="center" prop="taskName" />
- <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="annex" />
- <el-table-column label="当前进度" align="center" prop="annex" />
- <el-table-column label="执行单位数" align="center" prop="annex" />
- <!-- <el-table-column label="任务附件" align="center" prop="annex" /> -->
- <el-table-column label="备注" align="center" prop="remarkInfo" />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['workingArrangements:worktaskplan:edit']"
- >修改</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['workingArrangements:worktaskplan: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="700px"
- append-to-body
- :close-on-click-modal="false"
- >
- <el-form
- ref="form"
- :model="form"
- :rules="rules"
- label-width="80px"
- inline
- >
- <el-form-item label="任务名称" prop="taskName">
- <el-input v-model="form.taskName" placeholder="" class="ren_wu" />
- </el-form-item>
- <el-form-item label="开始时间" prop="startTime">
- <el-date-picker
- clearable
- 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
- v-model="form.endTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder=""
- >
- </el-date-picker>
- </el-form-item>
- <div class="jiben">任务附件</div>
- <fileUpload v-model="form.annexList" class="m-l-20" :limit="5" />
- <div class="jiben">备注</div>
- <el-form-item label="" prop="remarkInfo">
- <el-input
- v-model="form.remarkInfo"
- 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="open" width="700px" append-to-body>
- <el-form
- ref="form"
- :model="form"
- :rules="rules"
- label-width="80px"
- inline
- >
- <el-form-item label="任务名称" prop="taskName">
- <el-input v-model="form.taskName" placeholder="请输入任务名称" />
- </el-form-item>
- <el-form-item label="任务开始时间" prop="startTime">
- <el-date-picker
- clearable
- 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
- v-model="form.endTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择任务结束时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="任务附件" prop="annex">
- <el-input v-model="form.annex" placeholder="请输入任务附件" />
- </el-form-item>
- <el-form-item label="任务备注" prop="remarkInfo">
- <el-input v-model="form.remarkInfo" placeholder="请输入任务备注" />
- </el-form-item>
- <el-divider content-position="center">任务计划执行详情信息</el-divider>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="mini"
- @click="handleAddBdglWorkTaskPlanDetail"
- >添加</el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- icon="el-icon-delete"
- size="mini"
- @click="handleDeleteBdglWorkTaskPlanDetail"
- >删除</el-button
- >
- </el-col>
- </el-row>
- <el-table
- :data="bdglWorkTaskPlanDetailList"
- :row-class-name="rowBdglWorkTaskPlanDetailIndex"
- @selection-change="handleBdglWorkTaskPlanDetailSelectionChange"
- ref="bdglWorkTaskPlanDetail"
- >
- <el-table-column type="selection" width="50" align="center" />
- <el-table-column
- label="序号"
- align="center"
- prop="index"
- width="50"
- />
- <el-table-column label="单位ID" prop="unitId" width="150">
- <template slot-scope="scope">
- <el-input v-model="scope.row.unitId" placeholder="请输入单位ID" />
- </template>
- </el-table-column>
- <el-table-column label="任务执行人" prop="peopleName" width="150">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.peopleName"
- placeholder="请输入任务执行人"
- />
- </template>
- </el-table-column>
- <el-table-column label="任务描述" prop="taskDescription" width="150">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.taskDescription"
- placeholder="请输入任务描述"
- />
- </template>
- </el-table-column>
- <el-table-column
- label="任务执行情况0.待审核1.未完成2.已完成3.驳回"
- prop="taskStatus"
- width="150"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.taskStatus"
- placeholder="请选择任务执行情况0.待审核1.未完成2.已完成3.驳回"
- >
- <el-option label="请选择字典生成" value="" />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="任务反馈时间" prop="feedbackTime" width="240">
- <template slot-scope="scope">
- <el-date-picker
- clearable
- v-model="scope.row.feedbackTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="请选择任务反馈时间"
- />
- </template>
- </el-table-column>
- <el-table-column
- label="反馈内容"
- prop="feedbackDescription"
- width="150"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.feedbackDescription"
- placeholder="请输入反馈内容"
- />
- </template>
- </el-table-column>
- </el-table>
- </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> -->
- </div>
- </template>
- <script>
- import {
- listWorktaskplan,
- getWorktaskplan,
- delWorktaskplan,
- addWorktaskplan,
- updateWorktaskplan,
- } from "@/api/workingArrangements/worktaskplan";
- export default {
- name: "Worktaskplan",
- data() {
- return {
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 子表选中数据
- checkedBdglWorkTaskPlanDetail: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 任务计划基本信息表格数据
- worktaskplanList: [],
- // 任务计划执行详情表格数据
- bdglWorkTaskPlanDetailList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- taskName: null,
- startTime: null,
- endTime: null,
- annex: null,
- remarkInfo: null,
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- taskName: [
- { required: true, message: "任务名称不能为空", trigger: "blur" },
- ],
- startTime: [
- { required: true, message: "任务开始时间不能为空", trigger: "blur" },
- ],
- endTime: [
- { required: true, message: "任务结束时间不能为空", trigger: "blur" },
- ],
- annex: [
- { required: true, message: "任务附件不能为空", trigger: "blur" },
- ],
- },
- };
- },
- created() {
- this.getList();
- },
- methods: {
- /** 查询任务计划基本信息列表 */
- getList() {
- this.loading = true;
- listWorktaskplan(this.queryParams).then((response) => {
- this.worktaskplanList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- taskName: null,
- startTime: null,
- endTime: null,
- annex: null,
- remarkInfo: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- };
- this.bdglWorkTaskPlanDetailList = [];
- 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;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "新增工作任务";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids;
- getWorktaskplan(id).then((response) => {
- this.form = response.data;
- this.bdglWorkTaskPlanDetailList =
- response.data.bdglWorkTaskPlanDetailList;
- this.open = true;
- this.title = "修改工作任务";
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.form.bdglWorkTaskPlanDetailList =
- this.bdglWorkTaskPlanDetailList;
- if (this.form.id != null) {
- updateWorktaskplan(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addWorktaskplan(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm('是否确认删除任务计划基本信息编号为"' + ids + '"的数据项?')
- .then(function () {
- return delWorktaskplan(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 任务计划执行详情序号 */
- rowBdglWorkTaskPlanDetailIndex({ row, rowIndex }) {
- row.index = rowIndex + 1;
- },
- /** 任务计划执行详情添加按钮操作 */
- handleAddBdglWorkTaskPlanDetail() {
- let obj = {};
- obj.unitId = "";
- obj.peopleName = "";
- obj.taskDescription = "";
- obj.taskStatus = "";
- obj.feedbackTime = "";
- obj.feedbackDescription = "";
- this.bdglWorkTaskPlanDetailList.push(obj);
- },
- /** 任务计划执行详情删除按钮操作 */
- handleDeleteBdglWorkTaskPlanDetail() {
- if (this.checkedBdglWorkTaskPlanDetail.length == 0) {
- this.$modal.msgError("请先选择要删除的任务计划执行详情数据");
- } else {
- const bdglWorkTaskPlanDetailList = this.bdglWorkTaskPlanDetailList;
- const checkedBdglWorkTaskPlanDetail =
- this.checkedBdglWorkTaskPlanDetail;
- this.bdglWorkTaskPlanDetailList = bdglWorkTaskPlanDetailList.filter(
- function (item) {
- return checkedBdglWorkTaskPlanDetail.indexOf(item.index) == -1;
- }
- );
- }
- },
- /** 复选框选中数据 */
- handleBdglWorkTaskPlanDetailSelectionChange(selection) {
- this.checkedBdglWorkTaskPlanDetail = selection.map((item) => item.index);
- },
- /** 导出按钮操作 */
- handleExport() {
- this.download(
- "workingArrangements/worktaskplan/export",
- {
- ...this.queryParams,
- },
- `worktaskplan_${new Date().getTime()}.xlsx`
- );
- },
- },
- };
- </script>
- <style scoped>
- .el-input__inner {
- height: 36px;
- background-color: #00365f;
- color: #fff;
- border: 1px solid white !important;
- }
- .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;
- }
- ::v-deep .el-textarea__inner {
- width: 566px;
- height: 104px;
- }
- /* 表宽度 */
- .el-input {
- width: 200px;
- }
- .el-date-editor.el-input,
- .el-date-editor.el-input__inner {
- width: 200px;
- }
- /* 执行 */
- #execute {
- width: 510px;
- /* width: auto; */
- }
- .el-input--suffix {
- width: auto;
- }
- /* 上传附件样式 */
- .el-icon-document {
- padding: 3px 5px;
- color: white;
- }
- .el-upload-list__item:hover {
- background-color: #00365f;
- }
- /* 上传附件的删除按钮样式 */
- .el-link--inner {
- margin-left: 3px;
- }
- /* 弹框背景 */
- .el-dialog {
- background: #00365f;
- }
- .el-dialog__title {
- color: white;
- }
- .el-input .el-input__inner {
- background: rgba(0, 0, 0, 0);
- }
- /* 下拉框样式 */
- .el-select-dropdown__wrap .el-scrollbar__view {
- background-color: white;
- }
- /* 上传附件样式 */
- .el-icon-document {
- padding: 3px 5px;
- color: white;
- }
- .el-upload-list__item:hover {
- background-color: #00365f;
- }
- /* 修改编号样式 */
- .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: 930px;
- border: 1px solid #fff;
- border-radius: 4px;
- min-height: 35px;
- height: auto !important;
- line-height: 35px;
- text-indent: 1em;
- margin-bottom: 20px;
- }
- /* 完成进度 */
- .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;
- }
- .has-gutter {
- background-color: #004d86;
- }
- .el-dialog__body .el-table tr:nth-child(odd) {
- background-color: #004d86 !important;
- }
- .el-dialog__body .el-table tr:nth-child(even) {
- background-color: #004d86 !important;
- }
- .el-dialog__body table td {
- border-bottom: 1px solid white !important;
- }
- .el-dialog__body .el-table th.is-leaf {
- border: 1px solid white !important;
- }
- /* 下载按钮 */
- .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;
- }
- .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_1_column_8 .cell {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .el-table__empty-block {
- border-bottom: 1px solid white;
- }
- .vue-treeselect__control {
- background-color: transparent !important;
- }
- .threeselects .vue-treeselect__input {
- background-color: transparent !important;
- }
- .el-table__body-wrapper .el-table__empty-block {
- border: none !important;
- }
- .vue-treeselect__placeholder {
- color: #ccc;
- }
- .el-form-item__content {
- border-bottom: none !important;
- }
- ::v-deep .el-input__inner {
- border: 1px solid white !important;
- }
- .el-select-dropdown__item.selected {
- color: #000;
- font-weight: bold;
- }
- .vue-treeselect__menu {
- color: #606266;
- }
- /* 日历样式 */
- .el-date-picker__editor-wrap .el-input .el-input__inner {
- width: 100px !important;
- }
- .el-date-picker__time-header {
- border-bottom: none;
- }
- ::v-deep .el-input--small .el-input__inner {
- height: 36px;
- }
- ::v-deep .el-upload__tip {
- position: static !important;
- margin-left: 3px;
- margin-bottom: 21px;
- }
- .ren_wu {
- width: 501px;
- }
- /* 基本信息背景 */
- .jiben {
- width: 700px;
- height: 32px;
- background-image: url(../../../images/小标题底.png);
- margin-bottom: 25px;
- color: #fff;
- padding-left: 16px;
- line-height: 32px;
- background-size: 100%;
- }
- ::v-deep .el-form--inline .el-form-item {
- margin-right: 21px;
- }
- ::v-deep .el-dialog__body {
- margin-left: 40px;
- }
- </style>
|