123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- <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="status">
- <el-select
- v-model="queryParams.status"
- placeholder="请选择审核状态"
- clearable
- filterable
- >
- <el-option
- v-for="dict in statusList"
- :key="dict.value + 'statusList'"
- :label="dict.label"
- :value="dict.value"
- />
- </el-select>
- </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" 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="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['business:INSTACTIONTASK:export']"
- >导出</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row> -->
- <!-- <el-table
- v-loading="loading"
- :data="INSTACTIONTASKList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="${comment}" align="center" prop="id">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.id"
- />
- </template>
- </el-table-column>
- <el-table-column label="创建时间" align="center" prop="createTime">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.createTime"
- />
- </template>
- </el-table-column>
- <el-table-column label="创建人" align="center" prop="createBy">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.createBy"
- />
- </template>
- </el-table-column>
- <el-table-column label="修改时间" align="center" prop="updateTime">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.updateTime"
- />
- </template>
- </el-table-column>
- <el-table-column label="修改人" align="center" prop="updateBy">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.updateBy"
- />
- </template>
- </el-table-column>
- <el-table-column label="删除标识" align="center" prop="delFlag">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.delFlag"
- />
- </template>
- </el-table-column>
- <el-table-column label="活动实例任务ID" align="center" prop="instAcId">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.instAcId"
- />
- </template>
- </el-table-column>
- <el-table-column label="活动实例id" align="center" prop="instProId">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.instProId"
- />
- </template>
- </el-table-column>
- <el-table-column label="活动名称" align="center" prop="acname">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.acname"
- />
- </template>
- </el-table-column>
- <el-table-column label="审核人" align="center" prop="execId">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.execId"
- />
- </template>
- </el-table-column>
- <el-table-column label="任务启动时间" align="center" prop="beginTime">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.beginTime"
- />
- </template>
- </el-table-column>
- <el-table-column label="任务结束时间" align="center" prop="endTime">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.endTime"
- />
- </template>
- </el-table-column>
- <el-table-column
- label="审核状态(1=同意,2=驳回)"
- align="center"
- prop="status"
- >
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.status"
- />
- </template>
- </el-table-column>
- <el-table-column label="审核意见" align="center" prop="comments">
- <template slot-scope="scope">
- <dict-tag
- :options="dict.type.${column.dictType}"
- :value="scope.row.comments"
- />
- </template>
- </el-table-column>
- <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="['business:INSTACTIONTASK:edit']"
- >修改</el-button
- >
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['business:INSTACTIONTASK: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"
- />
- </div>
- </template>
- <script>
- import {
- listINSTACTIONTASK,
- getINSTACTIONTASK,
- delINSTACTIONTASK,
- addINSTACTIONTASK,
- updateINSTACTIONTASK,
- } from "@/api/portal/task/task";
- export default {
- name: "INSTACTIONTASK",
- data() {
- return {
-
- baseURL: process.env.VUE_APP_BASE_API,
-
- loading: true,
-
- ids: [],
-
- single: true,
-
- multiple: true,
-
- showSearch: true,
-
- total: 0,
-
- INSTACTIONTASKList: [],
-
- title: "",
-
- open: false,
-
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- id: null,
- createTime: null,
- createBy: null,
- updateTime: null,
- updateBy: null,
- delFlag: null,
- instAcId: null,
- instProId: null,
- acname: null,
- execId: null,
- beginTime: null,
- endTime: null,
- status: null,
- comments: null,
- },
-
- form: {},
-
- rules: {
- id: [{ required: true, message: "$comment不能为空", trigger: "blur" }],
- delFlag: [
- { required: true, message: "删除标识不能为空", trigger: "blur" },
- ],
- instAcId: [
- {
- required: true,
- message: "活动实例任务ID不能为空",
- trigger: "blur",
- },
- ],
- instProId: [
- { required: true, message: "活动实例id不能为空", trigger: "blur" },
- ],
- acname: [
- { required: true, message: "活动名称不能为空", trigger: "blur" },
- ],
- execId: [
- { required: true, message: "审核人不能为空", trigger: "blur" },
- ],
- beginTime: [
- { required: true, message: "任务启动时间不能为空", trigger: "blur" },
- ],
- endTime: [
- { required: true, message: "任务结束时间不能为空", trigger: "blur" },
- ],
- status: [
- {
- required: true,
- message: "审核状态(1=同意,2=驳回)不能为空",
- trigger: "blur",
- },
- ],
- comments: [
- { required: true, message: "审核意见不能为空", trigger: "blur" },
- ],
- },
- statusList: [
- { value: "1", label: "同意" },
- { value: "2", label: "驳回" },
- { value: "3", label: "退回" },
- ],
- };
- },
- created() {
- this.getList();
- },
- methods: {
-
- getList() {
- this.loading = true;
- listINSTACTIONTASK(this.queryParams).then((response) => {
- this.INSTACTIONTASKList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
-
- cancel() {
- this.open = false;
- this.reset();
- },
-
- reset() {
- this.form = {
- id: null,
- delFlag: null,
- instAcId: null,
- instProId: null,
- acname: null,
- execId: null,
- beginTime: null,
- endTime: null,
- status: "0",
- comments: null,
- };
- 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;
- getINSTACTIONTASK(id).then((response) => {
- this.form = response.data;
- this.open = true;
- this.title = "修改审批任务实例";
- });
- },
-
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- updateINSTACTIONTASK(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addINSTACTIONTASK(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 delINSTACTIONTASK(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
-
- handleExport() {
- this.download(
- "business/INSTACTIONTASK/export",
- {
- ...this.queryParams,
- },
- `INSTACTIONTASK_${new Date().getTime()}.xlsx`
- );
- },
- },
- };
- </script>
|