123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795 |
- <template>
- <div class="againAssign">
- <div class="conentBox">
- <div class="header">处理方案</div>
- <div v-if="model.incident" class="conent">
- <div class="navBar">
- <div class="fl">
- <a
- :class="{ active: actives == 'info' }"
- href="javascript:;"
- @click="toInfo('info')"
- >事件信息</a
- >
- </div>
- <div class="fl">
- <a
- :class="{ active: actives == 'assignee' }"
- href="javascript:;"
- @click="toInfo('assignee')"
- >重新指派</a
- >
- </div>
- <div class="fl">
- <a
- :class="{ active: actives == 'progress' }"
- href="javascript:;"
- @click="toInfo('progress')"
- >处理进度</a
- >
- </div>
- </div>
- <div class="label headtop" id="info">事件信息</div>
- <div class="info">
- <div class="head">
- <p>
- <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
- 事件编号:{{ model.incident.incidentsign }}
- <span class="fr btn chongxinzhipai">{{
- model.incident.state.name
- }}</span>
- </p>
- </div>
- <p>
- <span class="fl">事件分类</span>
- <span class="fr">{{ model.incident.category.category }}</span>
- </p>
- <!-- <p>
- <span class="fl">事件主题</span>
- <span class="fr">{{model.incident.title}}</span>
- </p> -->
- <p class="desc">
- <span class="fl">事件描述</span>
- <span
- class="fr grayFont"
- v-html="model.incident.description"
- ></span>
- </p>
- <div class="shows" id="shows">
- <p v-if="valConfig == 2">
- <span class="fl">报修科室</span>
- <span class="fr">{{
- model.incident.department ? model.incident.department.dept : ""
- }}</span>
- </p>
- <p v-if="valConfig == 1">
- <span class="fl">报修人</span>
- <span class="fr">{{ model.incident.requester.name }}</span>
- </p>
- <p v-if="valConfig == 2">
- <span class="fl">联系人</span>
- <span class="fr">{{ model.incident.contacts }}</span>
- </p>
- <p>
- <span class="fl">联系电话</span>
- <span
- class="fr"
- v-if="!model.incident.contactsInformation"
- ></span>
- <span class="fr" v-if="model.incident.contactsInformation"
- ><a :href="'tel:' + model.incident.contactsInformation"
- ><i class="iconfont icon-shouji"></i
- >{{ model.incident.contactsInformation }}</a
- ></span
- >
- </p>
- <p>
- <span class="fl">联系地址</span>
- <span class="fr">{{ model.incident.houseNumber || "" }}</span>
- </p>
- <p class="boeder_B">
- <span class="fl">事件来源</span>
- <span class="fr">{{ model.incident.source.name }}</span>
- </p>
- <!-- <p>
- <span class="fl">影响度</span>
- <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
- </p>
- <p>
- <span class="fl">紧急度</span>
- <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
- </p> -->
- <p>
- <span class="fl">受理人</span>
- <span class="fr">{{
- model.incident.acceptUser ? model.incident.acceptUser.name : ""
- }}</span>
- </p>
- <p>
- <span class="fl">处理人</span>
- <span class="fr">{{
- model.incident.handlerUser
- ? model.incident.handlerUser.name
- : ""
- }}</span>
- </p>
- <p>
- <span class="fl">处理人电话</span>
- <span class="fr" v-if="!model.incident.handlerUser"></span>
- <span class="fr" v-if="model.incident.handlerUser"
- ><a :href="'tel:' + model.incident.handlerUser.phone"
- ><i class="iconfont icon-shouji"></i
- >{{ model.incident.handlerUser.phone }}</a
- ></span
- >
- </p>
- <p>
- <span class="fl">优先级</span>
- <span class="fr">{{
- model.incident.priority ? model.incident.priority.name : ""
- }}</span>
- </p>
- <p>
- <span class="fl">逾期响应时间</span>
- <span class="fr">{{ model.incident.overdueResponseDate }}</span>
- </p>
- <p>
- <span class="fl">逾期解决时间</span>
- <span class="fr">{{ model.incident.overdueTime }}</span>
- </p>
- <p>
- <span class="fl">区域</span>
- <span class="fr">{{
- model.incident.place ? model.incident.place.area.area : "--"
- }}</span>
- </p>
- <p class="boeder_B">
- <span class="fl">地点</span>
- <span class="fr">{{
- model.incident.place ? model.incident.place.place : "--"
- }}</span>
- </p>
- <div v-if="hcsjList.length">
- <p>耗材</p>
- <div class="hcTable">
- <table>
- <tr>
- <td>耗材名称</td>
- <td>价格</td>
- <td>数量</td>
- </tr>
- <tr v-for="(item, i) in hcsjList" :key="i">
- <td>{{ item.consumable.name }}</td>
- <td>{{ item.extra1 }}</td>
- <td>{{ item.consumablesSum }}</td>
- </tr>
- </table>
- </div>
- </div>
- <p v-if="wxIncidentWithCmdb == 1">
- <span class="fl">资产</span>
- <span class="fr">{{ model.incident.assetId || "无" }}</span>
- </p>
- </div>
- <p class="info_hide">
- <span class="fl hide" @click="hides()" v-if="!item_hides"
- >展开详情 >></span
- >
- <span class="fl hide" @click="hides()" v-if="item_hides"
- >隐藏详情<<</span
- >
- </p>
- <div class="imgs-container" v-if="imgs.length">
- <div class="imgs-cont">
- <img
- v-if="
- img.suffix == 'jpeg' ||
- img.suffix == 'jpg' ||
- img.suffix == 'gif' ||
- img.suffix == 'png' ||
- img.suffix == 'svg' ||
- img.suffix == 'pdf'
- "
- :src="img.previewUrl"
- v-for="(img, index) in imgs"
- class="imgs"
- />
- <p v-else>
- <a :href="[img.previewUrl]">{{ img.name }}</a>
- </p>
- </div>
- </div>
- <div class="label" id="assignee">重新指派</div>
- <div class="info">
- <p>
- <span class="fl">重新指派原因:</span>
- <span class="fr">{{ model.resignComment }}</span>
- </p>
- </div>
- <div class="label" id="progress">处理进度</div>
- <div
- :class="{ progress: true, progressHide: !pro_hides }"
- id="progressBox"
- >
- <div class="progress_info" v-for="item in progressInfo">
- <div class="progress_info_L">{{ item.activityName }}</div>
- <div class="progress_info_R">
- <div class="time">
- <i
- :class="{
- iconfont: true,
- 'icon-icon_weizuo': item.endTime != '',
- 'icon-icon_zhengzaijinx': item.endTime == '',
- }"
- ></i>
- <span class="text1">
- {{ item.startTime | timeFormat("MM-dd HH:mm:ss") }}
- <template v-if="item.userName">
- ,{{ item.userName }}
- </template>
- </span>
- </div>
- <div :class="{ cont: true, blue: item.endTime != '' }">
- <p class="text2" v-if="item.desc" v-html="item.desc"></p>
- </div>
- </div>
- </div>
- </div>
- <p class="info_hide">
- <span class="fl hide" @click="proHides()">{{
- pro_hides ? "隐藏详情 <<" : "展开详情 >>"
- }}</span>
- </p>
- <div v-if="model.incident.handlerUser.id == loginUser.id">
- <div class="label">指派</div>
- <div class="form">
- <div class="txtLabel">
- <div class="txt fl handler">
- <span style="color: red">*</span>是否选择处理人:
- </div>
- <cube-switch v-model="handleUserOrGroup"></cube-switch>
- </div>
- <div class="txtLabel" v-if="handleUserOrGroup">
- <div class="txt fl">
- <span style="color: red">*</span> 处理人:
- </div>
- <cube-select
- class="selectGroup fl"
- v-model="handlerUser"
- :title="'请选择处理人'"
- :options="handlerUserArr"
- :placeholder="'请选择处理人'"
- ></cube-select>
- </div>
- <div class="txtLabel" v-if="!handleUserOrGroup">
- <div class="txt fl">
- <span style="color: red">*</span> 处理组:
- </div>
- <cube-select
- class="selectGroup fl"
- v-model="handlerGroup"
- :title="'请选择处理组'"
- :options="candidateGroupsArr"
- :placeholder="'请选择处理组'"
- ></cube-select>
- </div>
- <cube-form-group class="sub">
- <cube-button type="submit" @click="subVali()">提交</cube-button>
- </cube-form-group>
- </div>
- </div>
- </div>
- </div>
- <load-ing v-if="!model.incident"></load-ing>
- <promp-ting
- :conents="promptingConent"
- :status="promptingStatus"
- ></promp-ting>
- </div>
- </div>
- </template>
- <script>
- import LoadIng from "./../views/loading.vue";
- import PrompTing from "./../views/prompting.vue";
- export default {
- data() {
- return {
- id: "",
- loginUser: JSON.parse(localStorage.getItem("loginUser")),
- valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
- incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
- wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
- hcsjList: [], //绑定的耗材列表,展示
- promptingConent: "",
- promptingStatus: "",
- item_hides: false,
- actives: "info",
- processInstanceId: "",
- progressInfo: [], //处理进度
- imgs: [], //图片
- model: {}, //提交数据
- handleUserOrGroup: false, //处理人/处理组
- handlerUserArr: [], //处理人
- candidateGroupsArr: [], //处理组
- handlerUser: "", //处理人
- handlerGroup: "", //处理组
- pro_hides: false, //展开/收起处理进度
- };
- },
- components: {
- LoadIng,
- PrompTing,
- },
- methods: {
- // 获取事件上绑定的耗材
- getHcBySj() {
- this.$http
- .post("service/cmdb/storeList", {
- data: { type: 2, source: "1627", sourceId: this.id },
- })
- .then((result) => {
- if (result.data.status == 200) {
- this.hcsjList = result.data.data;
- }
- });
- },
- // 获取事件数据
- getParamsData() {
- var that = this;
- that.$http
- .get(
- "/service/form/renderForm/receiveform/" +
- that.processInstanceId +
- "/" +
- that.loginUser.id +
- "/" +
- that.id,
- {}
- )
- .then(function (res) {
- console.log(res.data);
- that.model = res.data.model;
- that.getProgressInfo();
- });
- },
- // 获取图片
- getImgs() {
- var that = this;
- that.$http
- .get(
- "service/common/common/listAttachment/incident/" +
- that.processInstanceId,
- {}
- )
- .then(function (res) {
- console.log(res.data);
- that.imgs = res.data.data.splice(0, 3);
- console.log(that.imgs);
- });
- },
- // 获取处理进度
- getProgressInfo() {
- var that = this;
- that.$http
- .post(
- "/service/bpm/bpm/flowTracingCustom/" + that.processInstanceId,
- {}
- )
- .then(function (res) {
- console.log(res.data);
- that.progressInfo = res.data.data;
- //处理日志startcaca
- if (that.model.incident.handlerLogs) {
- //添加日志
- that.model.incident.handlerLogs.forEach((v) => {
- that.progressInfo.push({
- startTime: v.opTime,
- endTime: 1,
- desc: v.opValue,
- userName: v.userName,
- activityName: "事件处理",
- });
- });
- }
- //处理数据
- that.progressInfo.forEach((v) => {
- if (!v.endTime) {
- v.endTime = 1;
- }
- v.startTime = new Date(v.startTime).getTime();
- });
- var kaishi = that.progressInfo.shift();
- var jiedan = that.progressInfo.shift();
- that.progressInfo.sort(function (o, c) {
- return c.startTime - o.startTime;
- });
- that.progressInfo.length && (that.progressInfo[0].endTime = "");
- that.progressInfo.push(jiedan);
- that.progressInfo.push(kaishi);
- console.log(that.progressInfo);
- //处理日志end
- });
- },
- //隐藏显示详情
- hides() {
- this.item_hides = !this.item_hides;
- $("#shows").slideToggle();
- },
- // 处理进度隐藏/展开
- proHides() {
- if (!this.pro_hides) {
- $("#progressBox").animate({
- height: $("#progressBox")[0].scrollHeight,
- });
- } else {
- $("#progressBox").animate({ height: "1.7rem" });
- }
- this.pro_hides = !this.pro_hides;
- },
- // 快速定位
- toInfo(id) {
- this.actives = id;
- $("body,html").animate(
- {
- scrollTop:
- $("#" + id).offset().top -
- $(".header")[0].offsetHeight -
- $(".navBar")[0].offsetHeight,
- },
- 260
- );
- },
- // 获取处理人
- getHandlerUser() {
- var that = this;
- this.$http
- .post("service/user/data/fetchDataList/user", {
- idx: 0,
- sum: 1000,
- user: {
- roledata: { rolecode: "first-line support" },
- selectType: "1",
- },
- })
- .then(function (res) {
- res.data.list.forEach(function (v, i) {
- that.handlerUserArr.push({
- text: v.name,
- value: v.id,
- });
- });
- });
- },
- // 获取处理组
- getCandidateGroups() {
- var that = this;
- this.$http
- .post("service/user/data/fetchDataList/group", {
- idx: 0,
- sum: 1000,
- group: { selectType: "nouser" },
- })
- .then(function (res) {
- res.data.list.forEach(function (v, i) {
- that.candidateGroupsArr.push({
- text: v.groupName,
- value: v.id,
- });
- });
- console.log(that.candidateGroupsArr);
- });
- },
- subVali() {
- var that = this;
- if (
- (!that.handleUserOrGroup && !that.handlerGroup) ||
- (that.handleUserOrGroup && !that.handlerUser)
- ) {
- $("#fade").fadeIn();
- that.promptingConent = "提交失败,请填写必填信息!";
- that.promptingStatus = false;
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- }
- that.model.handler_code = "resolve";
- delete that.model.receive_code;
- if (that.handleUserOrGroup) {
- delete that.model.candidateGroups;
- that.model.assignee = that.handlerUser;
- } else {
- delete that.model.assignee;
- delete that.model.incident.assignee;
- that.model.candidateGroups = that.handlerGroup;
- }
- that.$http
- .post(
- "service/bpm/bpm/completeTask/" +
- that.model.incident.taskId +
- "/" +
- that.loginUser.id,
- that.model
- )
- .then(function (res) {
- if (res.data.status == 200) {
- $("#fade").fadeIn();
- that.promptingConent = "恭喜您,提交成功!";
- that.promptingStatus = true;
- that.dialog = that
- .$createDialog({
- type: "alert",
- title: "提交成功",
- content: "点击返回首页",
- icon: "cubeic-right",
- onConfirm: (e, promptValue) => {
- that.$router.push({ path: "/main" });
- },
- })
- .show();
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- }
- });
- },
- },
- created() {
- this.processInstanceId = this.$route.params.data.processInstanceId;
- this.id = this.$route.params.data.id;
- this.getParamsData();
- this.getImgs();
- if (this.incidentWithConsumable == 1) {
- this.getHcBySj();
- }
- this.getHandlerUser();
- this.getCandidateGroups();
- },
- };
- </script>
- <style lang="less" scoped>
- i.iconfont.blue {
- color: #005395;
- // &::after {
- // content: "";
- // width: 0.01rem;
- // height: 0.4rem;
- // background: #005395;
- // position: relative;
- // display: block;
- // left: 0.14rem;
- // }
- }
- .againAssign {
- .header {
- width: 100%;
- height: 0.88rem;
- line-height: 0.88rem;
- text-align: center;
- color: #fff;
- font-size: 0.37rem;
- background: linear-gradient(#2e2f32, #414246);
- position: fixed;
- top: 0;
- z-index: 6;
- }
- .navBar {
- width: 100%;
- height: 0.96rem;
- line-height: 0.96rem;
- background-color: #fafafa;
- font-size: 0.28rem;
- position: fixed;
- top: 0.88rem;
- div {
- width: 33.33%;
- text-align: center;
- a {
- display: inline-block;
- height: 0.9rem;
- width: 1.7rem;
- padding: 0 0.1rem;
- &.active {
- color: #005395;
- border-bottom: 0.06rem solid #005395;
- }
- }
- }
- }
- .headtop {
- margin-top: 1.84rem;
- }
- .label {
- background-color: #eeeeee;
- height: 0.6rem;
- line-height: 0.58rem;
- padding-left: 0.2rem;
- font-size: 0.24rem;
- color: #666666;
- span {
- font-size: 0.2rem;
- display: inline-block;
- margin-left: 0.08rem;
- color: #999999;
- }
- &.formLabel {
- background-color: #fff;
- }
- }
- .conentBox {
- width: 100%;
- .conent {
- font-size: 0.32rem;
- font-weight: 400;
- line-height: 0.45rem;
- // border-bottom: 0.16rem solid #e5e5e5;
- .shows {
- display: none;
- }
- .boeder_B {
- border-bottom: 0.01rem solid #ccc;
- }
- p {
- &.desc {
- overflow: hidden;
- }
- .grayFont {
- width: 75%;
- text-align: right;
- overflow-x: scroll;
- }
- }
- .bottom {
- overflow: hidden;
- line-height: 0.86rem;
- border-bottom: 0.01rem solid #e6e6e6;
- font-size: 0.24rem;
- color: #999;
- padding: 0 0.24rem 0 0.48rem;
- }
- .info {
- color: #999;
- font-size: 0.28rem;
- overflow: hidden;
- .head {
- border-bottom: 0.01rem solid #e6e6e6;
- p {
- padding: 0.24rem 0.3rem;
- i {
- color: #00559d;
- }
- }
- }
- p {
- line-height: 0.4rem;
- padding: 0.1rem 0.24rem;
- overflow: hidden;
- .overflowEllipsis2 {
- margin-left: 1.96rem;
- }
- }
- .info_hide {
- padding: 0.2rem 0.24rem;
- border-bottom: 0.01rem solid #e6e6e6;
- .hide {
- color: #00559d;
- }
- }
- .imgs-container {
- a {
- color: #03c !important;
- &:visited {
- color: #551a8b !important;
- }
- }
- img {
- width: 1.5rem;
- height: 1.5rem;
- margin-right: 0.7rem;
- &:nth-child(1) {
- margin-left: 0.75rem;
- }
- }
- }
- .progress {
- padding: 0.2rem 0.2rem;
- overflow: hidden;
- transition-duration: 0.2s;
- transition-timing-function: linear;
- &.progressHide {
- height: 1.7rem;
- }
- .progress_info {
- overflow: hidden;
- margin-bottom: 0.1rem;
- &:nth-last-child(1) {
- .cont {
- border: none !important;
- }
- }
- .progress_info_L {
- float: left;
- color: #333;
- max-width: 18%;
- }
- .progress_info_R {
- float: right;
- margin-left: 0.09rem;
- width: 80%;
- font-size: 0.25rem;
- .time {
- i {
- margin-left: -0.15rem;
- &.icon-icon_weizuo {
- color: #005495;
- }
- &.icon-icon_zhengzaijinx {
- color: #48a843;
- font-size: 0.37rem;
- }
- }
- span {
- margin-left: 0.15rem;
- }
- }
- .cont {
- border-left: 1px solid #999;
- padding-left: 0.4rem;
- min-height: 0.4rem;
- &.blue {
- border-left: 1px solid #005395;
- }
- }
- .text1 {
- font-size: 0.15rem;
- }
- .text2 {
- color: #666;
- word-break: break-all;
- }
- p {
- padding: 0;
- }
- }
- }
- }
- }
- .txtLabel {
- width: 100%;
- overflow: hidden;
- padding: 0.32rem 0.24rem 0.32rem 0.32rem;
- .txt {
- width: 25%;
- color: #666;
- &.handler {
- width: 40%;
- }
- }
- .selectGroup {
- width: 62%;
- }
- }
- .sub {
- background: #ececec;
- .cube-btn {
- background-color: #005395 !important;
- width: 90%;
- margin: 0.2rem auto;
- border-radius: 8px;
- }
- }
- }
- }
- .showwrap {
- width: 75%;
- text-align: right;
- }
- }
- </style>
|