123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573 |
- <template>
- <div class="modifysend">
- <div class="top-add" @click="goNavigator()">
- <i class="iconfont icon-xinzeng"></i>
- <span class="txt">新增整改</span>
- </div>
- <van-tabs
- id="tabs"
- @change="getSelectedLoudong"
- @before-change="onBeforeChange"
- line-width="80rpx"
- title-active-color="#1D18BC"
- >
- <van-tab
- v-for="(item, index) in loudongList"
- :title="item.title"
- :name="item.name"
- :key="index"
- >
- </van-tab>
- </van-tabs>
- <div
- style="background: white; padding-top: 32rpx; padding: 0 32rpx"
- v-if="params.finishTypeMore == 2"
- >
- <uni-row>
- <uni-col :span="8">
- <div style="height: 70rpx; line-height: 70rpx">处理状态:</div>
- </uni-col>
- <uni-col :span="16">
- <picker
- @change="getFinishType"
- :value="params.finishTypeIndex"
- :range="finishStateList"
- range-key="text"
- >
- <view class="uni-select_2">
- {{
- params.finishTypeIndex === 0 || params.finishTypeIndex
- ? finishStateList[params.finishTypeIndex].text
- : "请选择"
- }}
- </view>
- </picker>
- </uni-col>
- </uni-row>
- <div style="margin-top: 16rpx">
- <uni-row>
- <uni-col :span="8">
- <div style="height: 70rpx; line-height: 70rpx">处理日期:</div>
- </uni-col>
- <uni-col :span="16">
- <uni-datetime-picker
- type="date"
- v-model="params.needFinishTime"
- @change="bindDateChange"
- :clear-icon="true"
- />
- <!-- <picker mode="date" @change="bindDateChange" style="float: left">
- <view class="uni-select_2">
- {{ !params.finishTime ? "请选择" : params.finishTime }}
- </view>
- finishTime
- </picker> -->
- </uni-col>
- </uni-row>
- </div>
- </div>
- <div class="info-findRectificationManagementInOutList">
- <checkbox-group @change="getIsCheckList">
- <div class="info-item" v-for="item in recordList" :key="item.id">
- <div class="info-top">
- <checkbox
- :value="item.id"
- :checked="item.isCheck"
- v-if="params.finishTypeMore == 1"
- />
- <div
- class="left"
- @click="jumpPageDetails(item.finishType, item.id)"
- >
- <img
- style="width: 90%; height: 90%; border-radius: 0.5rem"
- :src="
- item.infoMorePictureUrl != null &&
- item.infoMorePictureUrl.length > 0
- ? BASE_URI +
- '/FileController/download/' +
- item.infoMorePictureUrl[0]
- : ''
- "
- alt=""
- />
- </div>
- <div
- class="right"
- @click="jumpPageDetails(item.finishType, item.id)"
- >
- <p class="tit">
- {{ item.info }}
- </p>
- <p class="txt">创建时间:{{ item.createdAt }}</p>
- <!-- <p class="txt">{{ item.createdAt }}</p> -->
- <!-- <p class="txt">处理时间:{{ item.finishTime }}</p>
- <p class="txt">确认时间:{{ item.checkTime }}</p> -->
- </div>
- </div>
- <div class="info-bottom">
- <div class="left">
- <i class="iconfont icon-shijian"></i>
- <span>
- {{ item.updateAddress }}
- </span>
- </div>
- <div class="right">
- <span v-if="item.finishType == 1" class="normal-tip yd h-bg">
- 待派单
- </span>
- <span v-if="item.finishType == 2" class="normal-tip yd h-bg">
- 待处理
- </span>
- <span v-if="item.finishType == 3" class="normal-tip yd h-bg">
- 待确认
- </span>
- <span v-if="item.finishType == 4" class="normal-tip yd h-bg">
- 已完成
- </span>
- </div>
- </div>
- </div>
- </checkbox-group>
- <view class="‘btn-view‘" v-if="params.finishTypeMore == 1">
- <button class="btn" @click="modifysend()">任务派单</button>
- </view>
- </div>
- <select-dengjiyuan
- ref="selectDengjiyuan"
- :multiple="false"
- :range="range"
- :selectParent="false"
- :foldAll="true"
- rangeKey="name"
- idKey="id"
- @selectDengjiyuan="selectDengjiyuan"
- />
- </div>
- </template>
- <script>
- import {
- findRectificationManagementInOutList,
- getByCodes,
- getUserLocalStorageInfo,
- getSelectUserTwo,
- updateListRectificationManagement,
- } from "@/js_sdk/http.js";
- import tools from "../../subPackages/components/tkitree/tools.js";
- import selectDengjiyuan from "../../subPackages/components/select_dengjiyuan/tkitree.vue";
- // import Base from "@/pages/base/base";
- export default {
- data() {
- return {
- finishStateList: [
- { value: "", text: "全部" },
- { value: 2, text: "待处理" },
- { value: 3, text: "待确认" },
- { value: 4, text: "已完成" },
- ],
- range: [],
- isCheckList: [],
- loudongList: [
- { name: "1", title: "待派单" },
- { name: "2", title: "已派单" },
- ],
- BASE_URI: this.$constant.BASE_URI,
- dic_key: ["REPAIR_STATUS"],
- dic_SelectList: {},
- recordList: [],
- params: {
- openUser: getUserLocalStorageInfo().user.id,
- pageNum: 1,
- pageSize: 10,
- finishTypeMore: 1,
- },
- totalPage: 1,
- allData: [],
- findRectificationManagementInOutList: [
- {
- title: "关于组织2020年无锡市服务业提质增效资金项目申报的通知",
- name: "无锡 XXXX有限公司",
- date: "2020-09-18 19:34:06",
- type: "1",
- },
- {
- title:
- "关于组织2020年无锡市服务业提质增效资金项目申报的通知关于组织2020年无锡市服务业提质增效资金项目申报的通知",
- name: "无锡 XXXX有限公司",
- date: "2020-09-18 19:34:06",
- type: "2",
- },
- ],
- };
- },
- components: {
- selectDengjiyuan,
- },
- mounted() {
- // if (window.history && window.history.pushState) {
- // // 向历史记录中插入了当前页
- // history.pushState(null, null, document.URL);
- // window.addEventListener("popstate", this.goBack, false);
- // }
- },
- onLoad() {
- this.getByCodes();
- },
- onShow() {
- this.selectData();
- },
- methods: {
- getFinishType(e) {
- let that = this;
- that.params.finishType = that.finishStateList[e.detail.value].value;
- that.params.finishTypeIndex = e.detail.value;
- that.selectData();
- that.$forceUpdate();
- },
- bindDateChange(e) {
- let that = this;
- console.log(e);
- that.params.needFinishTime = e ? e : e;
- that.selectData();
- },
- getIsCheckList(e) {
- let that = this;
- that.isCheckList = e.detail.value;
- },
- selectDengjiyuan(e) {
- this.form.finishUserName = e[e.length - 1].name;
- this.form.finishUser = e[e.length - 1].id;
- this.$forceUpdate();
- },
- async modifysend() {
- let that = this;
- if (that.isCheckList.length == 0) {
- that.$showToast("请先选择要派发的整改");
- return;
- }
- let form = that.isCheckList.map((e) => {
- return {
- id: e,
- finishType: "2",
- updatedBy: getUserLocalStorageInfo().user.id,
- };
- });
- console.log(form);
- let data = await updateListRectificationManagement({
- entities: JSON.stringify(form),
- });
- if (data.code == 200) {
- that.$showToast("派单成功");
- that.selectData();
- }
- },
- async getSelectUserTwo(key) {
- let that = this;
- console.log(that.isCheckList);
- if (that.isCheckList.length == 0) {
- that.$showToast("请先选择要派发的整改");
- return;
- }
- let departmentList = await getSelectUserTwo("");
- that.range = tools.transData(
- departmentList.data,
- "id",
- "parentid",
- "children"
- );
- that.$refs[key]._show();
- that.$forceUpdate();
- },
- selectDengjiyuan(e) {
- var names = [];
- var ids = [];
- for (var p in e) {
- if (e[p].type == "u") {
- names.push(e[p].name);
- ids.push(e[p].id);
- }
- }
- this.form.xinxidengji = names.join(",");
- this.form.manageMessengerId = ids.join(",");
- },
- getSelectedLoudong(event) {
- let that = this;
- that.params = {
- openUser: getUserLocalStorageInfo().user.id,
- pageNum: 1,
- pageSize: 10,
- finishTypeMore: event.detail.name,
- };
- that.selectData();
- },
- goNavigator(id) {
- uni.navigateTo({
- url: "/pages/subPackages/modifyReport/add?isReport=" + 1,
- });
- },
- jumpPageDetails(type, id) {
- console.log(id);
- if (type == 4) {
- uni.navigateTo({
- url: "/pages/subPackages/modifyHandle/handle?id=" + id,
- });
- } else if (type == 3) {
- uni.navigateTo({
- url:
- "/pages/subPackages/modifySend/confirm?id=" +
- id +
- "&btnStatus=" +
- 1,
- });
- } else {
- uni.navigateTo({
- url:
- "/pages/subPackages/modifyReport/detail?id=" +
- id +
- "&pdStatus=" +
- 1,
- });
- }
- },
- async getByCodes() {
- let that = this;
- let data = await getByCodes(JSON.stringify(this.dic_key));
- that.dic_SelectList = that.$common.handleDicList(data);
- that.selectData();
- },
- // auth.currUser().id
- selectData() {
- const _this = this;
- findRectificationManagementInOutList(this.params).then((res) => {
- if (res) {
- res.rows.forEach((e) => {
- e.finishTime = this.$common.transServDay(e.finishTime);
- e.checkTime = !e.checkTime
- ? "暂无"
- : this.$common.transServDay(e.checkTime);
- e.updateAddress =
- e.updateAddress && e.updateAddress.length > 0
- ? e.updateAddress.replace("江苏省无锡市", "")
- : e.updateAddress;
- e.infoMorePictureUrl =
- e.infoMorePictureUrl && e.infoMorePictureUrl.length > 0
- ? e.infoMorePictureUrl.split(",")
- : [];
- e.createdAt = this.$common.transServDate(e.createdAt);
- console.log(e.infoMorePictureUrl);
- });
- this.recordList = res.rows;
- }
- });
- },
- getItemJson: function (item) {
- const fileUrls = item.fileUrl !== "" ? JSON.parse(item.fileUrl) : [];
- console.log(fileUrls);
- item.fileUrl = fileUrls;
- item.createdAt = this.$common.transServDate(item.createdAt);
- // console.log(item.status);
- // console.log(this.dic_SelectList.REPAIR_STATUS);
- // let index = this.dic_SelectList.REPAIR_STATUS.findIdex((e)=>e.value==item.status)
- // item.statusName = this.dic_SelectList.REPAIR_STATUS[index];
- return item;
- },
- /**
- *
- */
- quickSelect(item) {
- if (this.quickSleced.val && this.quickSleced.val === item.val) {
- this.quickSleced = {};
- } else {
- this.quickSleced = item;
- }
- },
- /**
- * 上传文件
- */
- afterRead(file) {
- console.log(file);
- },
- /**
- * 设置状态样式
- */
- setStatusStyle(status) {
- let statusClass = null;
- switch (status) {
- case "unAcceptance":
- statusClass = "pending-btn";
- break;
- case "acceptance":
- statusClass = "accepted-btn";
- break;
- case "processed":
- statusClass = "processed-btn";
- break;
- case "evaluated":
- statusClass = "evaluated-btn";
- break;
- }
- return statusClass;
- },
- },
- /**
- * 过滤器
- */
- filters: {
- /**
- * 状态:0、待受理 1、已受理 2、已处理 3、已评价
- */
- statusFilter(val) {
- let res = null;
- switch (val) {
- case "unAcceptance":
- res = "待处理";
- break;
- case "acceptance":
- res = "已受理";
- break;
- case "processed":
- res = "已处理";
- break;
- case "evaluated":
- res = "已评价";
- break;
- }
- return res;
- },
- },
- };
- </script>
- <style lang="scss" type="text/scss" scoped>
- .modifysend {
- .btn-view {
- width: 100%;
- height: 100rpx;
- padding: 20rpx 10%;
- background-color: #ffffff;
- position: fixed;
- bottom: 0;
- left: 0;
- }
- .uni-select_2 {
- font-size: 22rpx;
- border: 2px solid #e5e5e5;
- box-sizing: border-box;
- border-radius: 8rpx;
- padding: 0 10rpx;
- padding-left: 20rpx;
- position: relative;
- display: flex;
- -webkit-user-select: none;
- user-select: none;
- flex-direction: row;
- align-items: center;
- border-bottom: solid 2px #e5e5e5;
- width: 100%;
- flex: 1;
- height: 70rpx;
- color: #6a6a6a;
- }
- .btn {
- width: 80%;
- height: 90rpx;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- background: #1d18bc;
- line-height: 90rpx;
- color: white;
- }
- .top-add {
- background-color: #fff;
- padding: 30rpx;
- text-align: right;
- box-shadow: 0rpx 5rpx 10rpx 0rpx rgba(0, 0, 0, 0.05);
- i {
- font-size: 36rpx;
- color: $text6;
- margin-right: 15rpx;
- }
- .txt {
- font-size: 32rpx;
- color: $text6;
- }
- }
- .info-findRectificationManagementInOutList {
- height: calc(100vh - 124rpx);
- overflow-y: auto;
- .info-item {
- background-color: #fff;
- padding: 20rpx 30rpx;
- margin-bottom: 20rpx;
- .info-top {
- @include flex;
- .left {
- width: 286rpx;
- height: 168rpx;
- font-size: 0;
- border-radius: 10rpx;
- overflow: hidden;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .right {
- align-self: flex-start;
- width: 380rpx;
- .tit {
- width: 380rpx;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- font-size: 32rpx;
- line-height: 1.4;
- font-weight: bold;
- color: #333333;
- @include line-clamp;
- margin-bottom: 20rpx;
- }
- .txt {
- font-size: 28rpx;
- color: #666;
- }
- }
- }
- .info-bottom {
- margin-top: 20rpx;
- padding-top: 20rpx;
- border-top: 1rpx dashed #dbdbdb;
- @include flex;
- .left {
- i {
- font-size: 30rpx;
- color: #999999;
- margin-left: 10rpx;
- }
- span {
- font-size: 28rpx;
- color: #999999;
- }
- }
- .right {
- }
- }
- }
- }
- }
- </style>
-
|