123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322 |
- <template>
- <div class="againAssign">
- <div class="conentBox">
- <div class="header">处理方案</div>
- <div v-if="modelData.incident.id" class="conent">
- <div class="navBar">
- <div
- class="fl"
- :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
- >
- <a
- :class="{ active: actives == 'info' }"
- href="javascript:;"
- @click="toInfo('info')"
- >事件信息</a
- >
- </div>
- <!-- <div
- class="fl"
- :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
- >
- <a
- :class="{ active: actives == 'handlerLog' }"
- href="javascript:;"
- @click="toInfo('handlerLog')"
- >处理日志</a>
- </div> -->
- <div
- class="fl"
- :class="{ p50: modelData.incident.handlerUser.id != loginUser.id }"
- >
- <a
- :class="{ active: actives == 'progress' }"
- href="javascript:;"
- @click="toInfo('progress')"
- >处理进度</a
- >
- </div>
- <div
- class="fl"
- v-if="modelData.incident.handlerUser.id == loginUser.id"
- >
- <a
- :class="{ active: actives == 'handlerInfo' }"
- href="javascript:;"
- @click="toInfo('handlerInfo')"
- >处理信息</a
- >
- </div>
- </div>
- <div class="label headtop" id="info">事件信息</div>
- <div class="info">
- <div class="head">
- <p>
- <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
- 事件编号:{{ modelData.incident.incidentsign }}
- <span class="fr btn chulizhong">{{
- modelData.incident.state.name
- }}</span>
- </p>
- </div>
- <p>
- <span class="fl">事件分类</span>
- <span class="fr">{{ modelData.incident.category.category }}</span>
- </p>
- <!-- <p>
- <span class="fl">事件主题</span>
- <span class="fr">{{modelData.incident.title}}</span>
- </p> -->
- <p class="desc">
- <span class="fl">事件描述</span>
- <span
- class="grayFont fr"
- v-html="modelData.incident.description"
- ></span>
- </p>
- <div class="shows" id="shows">
- <p v-if="valConfig == 2">
- <span class="fl">报修科室</span>
- <span class="fr">{{
- modelData.incident.department
- ? modelData.incident.department.dept
- : ""
- }}</span>
- </p>
- <p v-if="valConfig == 1">
- <span class="fl">报修人</span>
- <span class="fr">{{ modelData.incident.requester.name }}</span>
- </p>
- <p v-if="valConfig == 2">
- <span class="fl">联系人</span>
- <span class="fr">{{ modelData.incident.contacts }}</span>
- </p>
- <p>
- <span class="fl">联系电话</span>
- <span
- class="fr"
- v-if="!modelData.incident.contactsInformation"
- ></span>
- <span class="fr" v-if="modelData.incident.contactsInformation"
- ><a :href="'tel:' + modelData.incident.contactsInformation"
- ><i class="iconfont icon-shouji"></i
- >{{ modelData.incident.contactsInformation }}</a
- ></span
- >
- </p>
- <p>
- <span class="fl">联系地址</span>
- <span class="fr">{{ modelData.incident.houseNumber || "" }}</span>
- </p>
- <p class="boeder_B">
- <span class="fl">事件来源</span>
- <span class="fr">{{ modelData.incident.source.name }}</span>
- </p>
- <!-- <p>
- <span class="fl">影响度</span>
- <span class="fr">{{modelData.incident.influence?modelData.incident.influence.name:''}}</span>
- </p>
- <p>
- <span class="fl">紧急度</span>
- <span class="fr">{{modelData.incident.emergency?modelData.incident.emergency.name:''}}</span>
- </p> -->
- <p>
- <span class="fl">受理人</span>
- <span class="fr">{{
- modelData.incident.acceptUser
- ? modelData.incident.acceptUser.name
- : ""
- }}</span>
- </p>
- <p>
- <span class="fl">处理人</span>
- <span class="fr">{{
- modelData.incident.handlerUser
- ? modelData.incident.handlerUser.name
- : ""
- }}</span>
- </p>
- <p>
- <span class="fl">处理人电话</span>
- <span class="fr" v-if="!modelData.incident.handlerUser"></span>
- <span class="fr" v-if="modelData.incident.handlerUser"
- ><a :href="'tel:' + modelData.incident.handlerUser.phone"
- ><i class="iconfont icon-shouji"></i
- >{{ modelData.incident.handlerUser.phone }}</a
- ></span
- >
- </p>
- <p>
- <span class="fl">优先级</span>
- <span class="fr">{{
- modelData.incident.priority
- ? modelData.incident.priority.name
- : ""
- }}</span>
- </p>
- <p>
- <span class="fl">逾期响应时间</span>
- <span class="fr">{{
- modelData.incident.overdueResponseDate
- }}</span>
- </p>
- <p>
- <span class="fl">逾期解决时间</span>
- <span class="fr">{{ modelData.incident.overdueTime }}</span>
- </p>
- <p>
- <span class="fl">区域</span>
- <span class="fr">{{
- modelData.incident.place
- ? modelData.incident.place.area.area
- : "--"
- }}</span>
- </p>
- <p class="boeder_B">
- <span class="fl">地点</span>
- <span class="fr">{{
- modelData.incident.place ? modelData.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">{{ modelData.incident.assetId || "无" }}</span>
- </p>
- <!-- <p v-if="modelData.incident.synergeticReason">
- <span class="fl" >协同原因</span>
- <span class="fr">{{modelData.incident.synergeticReason}}</span>
- </p>
- <p v-if="modelData.isupreason">
- <span class="fl">升级原因</span>
- <span class="fr">{{modelData.isupreason}}</span>
- </p>
- <p v-if="modelData.transferReason">
- <span class="fl">转派原因</span>
- <span class="fr" >{{modelData.transferReason}}</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>
- <!-- <HandlerLog :data="modelData.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
- <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="modelData.incident.handlerUser.id == loginUser.id">
- <div class="label" id="handlerInfo">处理信息</div>
- <!-- 添加耗材 start -->
- <div style="margin-top:16px;margin-bottom:16px;">
- <div v-for="(item, i) in hcList" :key="i" class="hcList">
- <cube-select
- placeholder="请选择耗材"
- class="hcItem"
- v-model="item.assetConsumablesId"
- :options="hcs"
- ></cube-select>
- <cube-input
- type="number"
- v-model="item.extra1"
- placeholder="请输入价格"
- class="hcItem"
- ></cube-input>
- <cube-input
- type="number"
- v-model="item.consumablesSum"
- placeholder="请输入数量"
- class="hcItem"
- ></cube-input>
- <span
- class="icon iconfont icon-shanchu hcItemClose"
- @click="removeHc(item.id)"
- ></span>
- </div>
- </div>
- <div
- class="addHc"
- @click="addHc()"
- v-if="incidentWithConsumable == 1"
- >
- <i class="cubeic-add"></i>增加耗材
- </div>
- <!-- 添加耗材 end -->
- <div class="handlerInfo">
- <cube-form
- :model="model"
- @validate="validateHandler"
- @submit="submitHandler"
- >
- <cube-form-group>
- <!-- <cube-form-item :field="fields[12]" class="btn_plcaeholde"> -->
- <!-- <cube-button @click="showDatePicker">{{model.dateValue || 'Please select date'}}</cube-button> -->
- <!-- <date-picker ref="datePicker" :min="[2008, 8, 8]" :max="[2020, 10, 20]" @select="dateSelectHandler"></date-picker> -->
- <!-- </cube-form-item> -->
- <!-- <cube-form-item :field="fields[13]" class="btn_plcaeholde"></cube-form-item> -->
- <div class="handleRadio">
- <cube-radio-group
- v-model="order"
- :options="handleTypes"
- position="right"
- :hollow-style="true"
- />
- </div>
- <cube-form-item
- :field="fields[0]"
- v-if="order == 1"
- ></cube-form-item>
- <cube-form-item
- :field="fields[1]"
- class="btn_plcaeholde"
- v-if="order == 1"
- >
- <cube-button @click="showCategoryPicker()">{{
- selectedCategoryTxt
- ? selectedCategoryTxt
- : "请选择事件分类"
- }}</cube-button>
- </cube-form-item>
- <cube-form-item
- :field="fields[2]"
- v-if="order == 1"
- ></cube-form-item>
- <cube-form-item
- :field="fields[3]"
- class="incidentTitle"
- v-if="order == 1"
- >
- <div class="titleRefer">
- <textarea
- class="titleTxtArea fl"
- placeholder="请输入处理方案"
- v-model="incidentTitle"
- @input="inpTitle()"
- ></textarea>
- <span class="abtn fl" @click="referKnowledge()"
- >引入知识库</span
- >
- </div>
- </cube-form-item>
- <div class="label formLabel" v-if="order == 1">
- 报修图片
- <span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
- </div>
- <div class="uplod" v-if="order == 1">
- <cube-upload
- ref="upload"
- :max="3"
- :action="action"
- :simultaneous-uploads="3"
- @files-added="filesAdded"
- @file-submitted="fileSubmitted"
- />
- </div>
- <cube-form-item
- :field="fields[4]"
- v-if="order == 1"
- ></cube-form-item>
- <cube-form-item
- :field="fields[5]"
- class="btn_plcaeholde"
- v-if="order == 1 && !!model.knowledge"
- ></cube-form-item>
- <cube-form-item
- :field="fields[14]"
- v-if="order == 1"
- ></cube-form-item>
- <cube-form-item
- :field="fields[10]"
- v-if="order == 1 && !!model.isHelper"
- >
- <div class="synerBox">
- <cube-checkbox-group
- v-model="synergeticChecked"
- :options="synergeticList"
- />
- </div>
- </cube-form-item>
- <cube-form-item
- :field="fields[11]"
- v-if="order == 1 && !!model.isHelper"
- ></cube-form-item>
- <cube-form-item
- :field="fields[6]"
- v-if="order == 2"
- ></cube-form-item>
- <!-- <cube-form-item
- :field="fields[15]"
- v-if="order == 5"
- ></cube-form-item> -->
- <cube-form-item
- :field="fields[7]"
- v-if="order == 2"
- ></cube-form-item>
- <cube-form-item
- :field="fields[8]"
- v-if="order == 3"
- ></cube-form-item>
- <cube-form-item
- :field="fields[9]"
- v-if="order == 3"
- ></cube-form-item>
- <!-- <cube-form-item
- :field="fields[16]"
- class="incidentTitle"
- >
- <div class="titleRefer">
- <textarea
- style="margin-top:0.1rem;width:100%;"
- class="titleTxtArea fl"
- placeholder="请输入处理日志"
- v-model="handlerLog"
- ></textarea>
- </div>
- </cube-form-item> -->
- </cube-form-group>
- <cube-form-group class="sub">
- <cube-button type="submit" @click="subVali()"
- >提交</cube-button
- >
- </cube-form-group>
- </cube-form>
- </div>
- </div>
- </div>
- </div>
- <load-ing v-if="!modelData.incident.id"></load-ing>
- <promp-ting
- :conents="promptingConent"
- :status="promptingStatus"
- ></promp-ting>
- </div>
- </div>
- </template>
- <script>
- import CubePage from "./../components/cube-page.vue";
- import CubeButtonGroup from "./../components/cube-button-group.vue";
- import DatePicker from "./../components/date-picker.vue";
- import CubeExtendPopup from "./../components/extend-popup.vue";
- import LoadIng from "./../views/loading.vue";
- import PrompTing from "./../views/prompting.vue";
- // import HandlerLog from "./../views/handlerLog.vue";
- // import host from '../request/host'
- // 知识库类型
- const solution = {
- props: {
- value: {
- default() {
- return [];
- },
- },
- },
- data() {
- return {
- selected: [],
- selectData: [],
- initVal: JSON.parse(localStorage.getItem("solution")) || [0, 0, 0],
- };
- },
- render(createElement) {
- return createElement(
- "cube-button",
- {
- on: {
- click: this.showPicker,
- },
- },
- this.selected.length
- ? this.selected[this.selected.length - 1]
- : "请选择知识库类型"
- );
- },
- created() {
- this.getTree();
- },
- mounted() {},
- methods: {
- showPicker() {
- this.picker.show();
- },
- selectHandler(selectedVal, selectedIndex, selectedTxt) {
- var selected = [];
- selectedTxt.forEach(function (v, i) {
- if (v != "") {
- selected.push(v);
- }
- });
- this.selected = selected;
- this.$emit("input", selectedVal);
- localStorage.setItem("solution", JSON.stringify(selectedIndex));
- },
- // 获取事件分类数据
- getTree() {
- let that = this;
- that.$http
- .post("service/solution/fetchDataList/solutionType", {
- idx: 0,
- sum: 100,
- })
- .then(function (res) {
- // console.log(res);
- var list = res.data.list;
- var tree = [];
- list.forEach((v, i) => {
- if (!v.parent) {
- tree[i] = {
- value: v.id,
- text: v.typeName,
- children: [],
- };
- } else {
- tree.forEach((val, idx) => {
- if (
- v.parent &&
- !v.parent.parent &&
- val.text == v.parent.typeName
- ) {
- tree[idx].children.push({
- value: v.id,
- text: v.typeName,
- children: [],
- });
- } else if (v.parent.parent) {
- tree[idx].children.forEach((value, index) => {
- if (value.text == v.parent.typeName) {
- tree[idx].children[index].children.push({
- value: v.id,
- text: v.typeName,
- });
- }
- });
- }
- });
- }
- });
- that.selectData = tree;
- that.picker = that.$createCascadePicker({
- title: "知识库类型选择",
- data: that.selectData,
- selectedIndex: that.initVal,
- onSelect: that.selectHandler,
- });
- });
- },
- },
- };
- export default {
- data() {
- return {
- loginUser: JSON.parse(localStorage.getItem("loginUser")),
- incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
- wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
- valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
- id: "",
- resignComment: "", //重新指派原因
- item_hides: false,
- actives: "info",
- processInstanceId: "",
- progressInfo: [], //处理进度
- imgs: [], //图片
- model: {}, //提交数据
- validity: {},
- valid: undefined,
- action: {
- target:
- this.$host + "/service/common/common/uploadAttachment/incident/",
- data: {},
- },
- isUploading: false,
- loadShow: false,
- pro_hides: false, //展开/收起处理进度
- name: "",
- phone: "",
- label: "incidentInfo", //顶部快速定位
- modelData: {
- incident: {},
- }, //上传的model
- incidentTitle: "", //处理方案
- handlerLog: "", //处理日志
- referenceInfo: {}, //引用信息
- selectedCategoryTxt: "", //事件分类选中展示
- selectedAreaId: "", //区域选中id--seimin
- selectedAreaName: "", //区域选中名称--seimin
- selectedPlaceId: "", //地点选中id--seimin
- selectedPlaceName: "", //地点选中名称--seimin
- model: {
- handleCategory: "", //处理方式
- closecode: "", //关闭代码
- category: [], //确认事件分类
- handleDescription: "", //处理方案
- knowledge: false, //是否提交知识库
- isHelper: false, //是否需要协同
- solutionType: [], //知识库类型
- handlerUser: "", //升级/转派对象
- isupreason: "", //升级原因
- transferReason: "", //转派原因
- synergeticChecked: [], //选中协同对象
- synergeticReason: "", //协同原因
- selectArea: "",
- selectPlace: "",
- },
- // showPrompting:false,
- promptingConent: "",
- promptingStatus: "",
- order: 1, //处理方式 1:直接处理,2:升级,3:转派,4:协同
- handleCategoryArr: [], //处理方式数组
- closecodeArr: [], //关闭代码数组
- // handlerUserArr: [], //处理人数组
- synergeticList: [], //协同对象列表
- synergeticChecked: [], //选中协同对象
- handleTypes: [
- {
- label: "直接处理",
- value: 1,
- },
- {
- label: "升级",
- value: 2,
- },
- {
- label: "转派",
- value: 3,
- },
- // {
- // label: "指派",
- // value: 5
- // }
- // {
- // label: "协同",
- // value: 4
- // }
- ],
- vali: false,
- fields: [
- {
- type: "select",
- modelKey: "handleCategory",
- label: "处理方式:",
- props: {
- options: this.handleCategoryArr,
- title: "请选择处理方式",
- placeholder: "请选择处理方式",
- },
- rules: {
- required: true,
- },
- },
- {
- component: "button",
- modelKey: "category",
- label: "确认事件分类:",
- rules: {
- required: true,
- },
- },
- {
- type: "select",
- modelKey: "closecode",
- label: "关闭代码:",
- props: {
- options: this.closecodeArr,
- title: "请选择关闭代码",
- placeholder: "请选择关闭代码",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "textarea",
- modelKey: "handleDescription",
- label: "处理方案:",
- props: {
- placeholder: "请填写处理方案",
- },
- rules: {
- required: true,
- },
- debounce: 100,
- },
- {
- type: "switch",
- modelKey: "knowledge",
- label: "是否提交知识库:",
- rules: {
- required: false,
- },
- },
- {
- component: solution,
- modelKey: "solutionType",
- label: "知识库类型:",
- rules: {
- required: true,
- },
- messages: {
- required: "",
- },
- },
- {
- type: "select",
- modelKey: "handlerUser",
- label: "升级对象:",
- props: {
- options: [],
- placeholder: "请选择升级对象",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "input",
- modelKey: "isupreason",
- label: "升级原因:",
- props: {
- placeholder: "请输入升级原因",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "select",
- modelKey: "handlerUser",
- label: "转派对象:",
- props: {
- options: [],
- placeholder: "请选择转派对象",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "input",
- modelKey: "transferReason",
- label: "转派原因:",
- props: {
- placeholder: "请输入转派原因",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "checkbox-group",
- modelKey: "synergeticChecked",
- label: "协同对象:",
- props: {
- options: [],
- placeholder: "请选择协同对象",
- },
- rules: {
- required: false,
- },
- },
- {
- type: "input",
- modelKey: "synergeticReason",
- label: "协同原因:",
- props: {
- placeholder: "请输入协同原因",
- },
- rules: {
- required: false,
- },
- },
- {
- type: "select",
- modelKey: "selectArea",
- label: "区域:",
- props: {
- options: [],
- title: "请选择区域:",
- placeholder: "请选择区域:",
- },
- events: {
- change: (id, index, text) => {
- // console.log(id,index,text,9999)
- this.getPlaceList(id).then((res) => {
- this.selectedAreaId = id;
- this.selectedAreaName = text;
- // {{modelData.incident.place?modelData.incident.place.area.area:'--'}}
- console.log(this.modelData, "asad");
- if (this.modelData.incident.place) {
- this.$set(this.modelData.incident.place, "area", {
- id,
- area: text,
- });
- } else {
- this.$set(this.modelData.incident, "place", {
- area: {
- id,
- area: text,
- },
- });
- }
- });
- },
- },
- rules: {
- required: true,
- },
- },
- {
- type: "select",
- modelKey: "selectPlace",
- label: "地点:",
- props: {
- options: [],
- title: "请选择地点:",
- placeholder: "请选择地点:",
- },
- events: {
- change: (id, index, text) => {
- this.selectedPlaceId = id;
- this.selectedPlaceName = text;
- this.$set(
- this.modelData.incident,
- "houseNumber",
- this.selectedAreaName + this.selectedPlaceName
- );
- if (this.modelData.incident.place) {
- this.$set(this.modelData.incident.place, "place", text);
- this.$set(this.modelData.incident.place, "id", id);
- } else {
- this.$set(this.modelData.incident, "place", {
- id,
- place: text,
- });
- }
- },
- },
- rules: {
- required: true,
- },
- },
- {
- type: "switch",
- modelKey: "isHelper",
- label: "是否需要协同:",
- rules: {
- required: false,
- },
- },
- {
- type: "select",
- modelKey: "handlerUser",
- label: "指派对象:",
- props: {
- options: [],
- placeholder: "请选择指派对象",
- },
- rules: {
- required: true,
- },
- },
- {
- type: "textarea",
- modelKey: "handlerLog",
- label: "处理日志:",
- props: {
- placeholder: "请填写处理日志",
- },
- rules: {
- required: false,
- },
- debounce: 100,
- },
- ],
- hcList: [], //绑定的耗材列表
- idMock: 0, //自增id,mock
- hcs: [], //耗材列表
- hcsjList: [], //绑定的耗材列表,展示
- };
- },
- watch: {
- // 监听synergeticChecked变化
- synergeticChecked: {
- handler: function (n, o) {
- this.model.synergeticChecked = n;
- },
- },
- },
- components: {
- LoadIng,
- // HandlerLog
- },
- methods: {
- // 获取耗材列表
- getHcs() {
- this.$http
- .post("service/bpm/data/fetchDataList/consumable", {
- idx: 0,
- sum: 1000,
- consumable: {isInventory:1},
- })
- .then((res) => {
- if (res.data.status == 200) {
- this.hcs = res.data.list.map((v) => ({
- value: v.id,
- text: v.name,
- }));
- }
- });
- },
- // 增加耗材
- addHc() {
- let sourceId = this.modelData.incident.id;
- // consumablesSum 耗材数量
- // assetConsumablesId 耗材id
- // sourceId 事件id
- this.hcList.push({
- id: ++this.idMock,
- type: 2,
- consumablesSum: null,
- assetConsumablesId: null,
- sourceId,
- extra1: null,
- source: 1627,
- });
- },
- // 删除耗材
- removeHc(id) {
- this.hcList = this.hcList.filter((v) => v.id != id);
- },
- //获取区域
- getAreaList() {
- return new Promise((resolve, reject) => {
- this.$http
- .post("service/user/data/fetchDataList/area", { idx: 0, sum: 1000 })
- .then((res) => {
- if (res.data.status == 200) {
- let arr = res.data.list.map((item) => {
- return { value: item.id, text: item.area };
- });
- // console.log(arr,2222)
- // this.selectedAreaArr = arr;
- this.fields.forEach((item) => {
- if (item.modelKey === "selectArea") {
- item.props.options = arr;
- }
- });
- resolve(res);
- }
- });
- });
- },
- //根据区域获取地点
- getPlaceList(id) {
- return new Promise((resolve, reject) => {
- this.$http
- .post("service/user/data/fetchDataList/place", {
- idx: 0,
- sum: 1000,
- place: { area: { id } },
- })
- .then((res) => {
- if (res.data.status == 200) {
- let arr = res.data.list.map((item) => {
- return { value: item.id, text: item.place };
- });
- // console.log(arr,2222)
- // this.selectedAreaArr = arr;
- this.fields.forEach((item) => {
- if (item.modelKey === "selectPlace") {
- item.props.options = arr;
- }
- });
- resolve(res);
- }
- });
- });
- },
- // 获取事件数据
- getParamsData() {
- var that = this;
- that.$http
- .get(
- "/service/form/renderForm/handlerform/" +
- that.processInstanceId +
- "/" +
- that.loginUser.id +
- "/" +
- that.id,
- {}
- )
- .then(function (res) {
- console.log(res.data, 666);
- that.modelData = res.data.model;
- //seimin
- localStorage.setItem("modelData", JSON.stringify(that.modelData));
- });
- },
- // 获取图片
- getImgs() {
- var that = this;
- that.$http
- .get(
- "service/common/common/listAttachment/incident/" +
- that.processInstanceId,
- {}
- )
- .then(function (res) {
- that.imgs = res.data.data.splice(0, 3);
- });
- },
- // 事件分类回显
- setCategory() {
- let that = this;
- // console.log(898);
- // console.log(that.modelData.incident.category);
- // let cate = that.modelData.incident.category;
- if (localStorage.getItem("referenceInfo")) {
- that.referenceInfo = JSON.parse(localStorage.getItem("referenceInfo"));
- // that.incidentTitle = that.model.handleDescription =
- // that.referenceInfo.content;
- //baba
- var selectedVal = []; //存id,对应value
- var selectedIndex = []; //存索引
- var selectedTxt = []; //存名称
- if (this.referenceInfo.category) {
- console.log(this.selectData, "所有事件分类");
- console.log(this.referenceInfo.category, "返回的数据");
- var category = this.referenceInfo.category;
- selectedVal = [category.id]; //存id,对应value
- // selectedVal
- if (category.parentCategory) {
- //上级
- selectedVal.unshift(category.parentCategory.id);
- if (category.parentCategory.parentCategory) {
- //上上级
- selectedVal.unshift(category.parentCategory.parentCategory.id);
- }
- }
- // selectedIndex selectedTxt
- //一级
- if (selectedVal[0]) {
- this.selectData.forEach(function (v, i) {
- if (v.value == selectedVal[0]) {
- selectedIndex.push(i);
- selectedTxt.push(v.text);
- }
- });
- // 二级
- if (selectedVal[1]) {
- this.selectData[selectedIndex[0].toString()].children.forEach(
- function (v, i) {
- if (v.value == selectedVal[1]) {
- selectedIndex.push(i);
- selectedTxt.push(v.text);
- }
- }
- );
- // 三级
- if (selectedVal[2]) {
- this.selectData[selectedIndex[0].toString()].children[
- selectedIndex[1].toString()
- ].children.forEach(function (v, i) {
- if (v.value == selectedVal[2]) {
- selectedIndex.push(i);
- selectedTxt.push(v.text);
- }
- });
- }
- }
- }
- console.log(selectedVal, selectedIndex, selectedTxt, "获取的数据");
- }
- //回显
- var selected = [];
- selectedTxt.forEach(function (v, i) {
- if (v != "") {
- selected.push(v);
- }
- });
- this.selected = selected;
- this.selectedCategoryTxt = selected.length
- ? selected[selected.length - 1]
- : "";
- this.model.category = selectedVal;
- localStorage.setItem("category", JSON.stringify(selectedIndex));
- localStorage.setItem("categoryVal", JSON.stringify(selectedVal));
- localStorage.setItem(
- "selectedCategoryTxt",
- JSON.stringify(this.selectedCategoryTxt)
- );
- }
- },
- // 获取处理进度
- 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.modelData.incident.handlerLogs) {
- //添加日志
- that.modelData.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
- );
- },
- // 输入处理方案
- inpTitle() {
- this.model.handleDescription = this.incidentTitle;
- },
- subVali() {
- this.vali = true;
- },
- // 获取处理方式
- getHandleCategory() {
- var that = this;
- this.$http
- .post("service/common/common/getDictionary", {
- key: "incident_handleCategory",
- type: "list",
- })
- .then(function (res) {
- res.data.forEach(function (v, i) {
- that.handleCategoryArr.push({
- text: v.name,
- value: v.id,
- });
- });
- that.fields[0].props.options = that.handleCategoryArr;
- });
- },
- // 获取关闭代码
- getClosecode() {
- var that = this;
- this.$http
- .post("service/common/common/getDictionary", {
- key: "incident_closecode",
- type: "list",
- })
- .then(function (res) {
- res.data.forEach(function (v, i) {
- that.closecodeArr.push({
- text: v.desc,
- value: v.id,
- });
- });
- that.fields[2].props.options = that.closecodeArr;
- });
- },
- // 获取指派对象baba
- getZpUser() {
- var that = this;
- var postData = {
- idx: 0,
- sum: 1000,
- user: {
- roledata: { rolecode: "first-line support" },
- roledata2: { rolecode: "second-line support" },
- selectType: "1",
- },
- };
- this.$http
- .post("service/user/data/fetchDataList/user", postData)
- .then(function (res) {
- var handlerUserArr = [];
- res.data.list.forEach(function (v, i) {
- handlerUserArr.push({
- text: v.name,
- value: v.id,
- });
- });
- that.fields[15].props.options = handlerUserArr;
- });
- },
- // 获取升级对象
- getUpUser() {
- var that = this;
- var postData = {
- idx: 0,
- sum: 1000,
- user: {
- roledata: { rolecode: "second-line support" },
- selectType: "1",
- },
- };
- this.$http
- .post("service/user/data/fetchDataList/user", postData)
- .then(function (res) {
- var handlerUserArr = [];
- res.data.list.forEach(function (v, i) {
- handlerUserArr.push({
- text: v.name,
- value: v.id,
- });
- });
- that.fields[6].props.options = handlerUserArr;
- });
- },
- // 获取转派对象
- getRotateUser() {
- var that = this;
- var postData = {
- idx: 0,
- sum: 1000,
- user: {
- roledata: { rolecode: "first-line support" },
- selectType: "1",
- },
- };
- this.$http
- .post("service/user/data/fetchDataList/user", postData)
- .then(function (res) {
- var handlerUserArr = [];
- res.data.list.forEach(function (v, i) {
- handlerUserArr.push({
- text: v.name,
- value: v.id,
- });
- });
- that.fields[8].props.options = handlerUserArr;
- });
- },
- // 获取协同对象
- getSynerUser() {
- var that = this;
- var postData = {
- idx: 0,
- sum: 1000,
- };
- this.$http
- .post("service/user/data/fetchDataList/user", postData)
- .then(function (res) {
- var handlerUserArr = [];
- res.data.list.forEach(function (v, i) {
- handlerUserArr.push({
- label: v.name,
- value: v.id,
- });
- });
- that.fields[10].props.options = handlerUserArr;
- that.synergeticList = handlerUserArr;
- });
- },
- // 获取页面数据
- getMessage() {
- var that = this;
- if (localStorage.getItem("model")) {
- that.model = JSON.parse(localStorage.getItem("model"));
- }
- if (localStorage.getItem("modelData")) {
- that.modelData = JSON.parse(localStorage.getItem("modelData"));
- }
- if (localStorage.getItem("referenceInfo")) {
- that.referenceInfo = JSON.parse(localStorage.getItem("referenceInfo"));
- that.incidentTitle = that.model.handleDescription =
- that.referenceInfo.content;
- }
- if (localStorage.getItem("order")) {
- that.order = localStorage.getItem("order") - 0;
- }
- if (localStorage.getItem("selectedCategoryTxt")) {
- that.selectedCategoryTxt = JSON.parse(
- localStorage.getItem("selectedCategoryTxt")
- );
- }
- that.getProgressInfo();
- },
- // 事件分类
- showCategoryPicker() {
- this.categoryPicker.show();
- },
- selectCategoryHandler(selectedVal, selectedIndex, selectedTxt) {
- console.log(selectedVal, selectedIndex, selectedTxt);
- var selected = [];
- selectedTxt.forEach(function (v, i) {
- if (v != "") {
- selected.push(v);
- }
- });
- this.selected = selected;
- this.selectedCategoryTxt = selected.length
- ? selected[selected.length - 1]
- : "";
- this.model.category = selectedVal;
- localStorage.setItem("category", JSON.stringify(selectedIndex));
- localStorage.setItem("categoryVal", JSON.stringify(selectedVal));
- localStorage.setItem(
- "selectedCategoryTxt",
- JSON.stringify(this.selectedCategoryTxt)
- );
- },
- getIncidentcategory() {
- var that = this;
- this.$http
- .post("service/bpm/data/fetchDataList/incidentcategory", {
- idx: 0,
- sum: 1000,
- })
- .then(function (res) {
- var list = res.data.list;
- var tree = [];
- list.forEach((v, i) => {
- if (!v.parent) {
- tree[i] = {
- value: v.id,
- text: v.category,
- children: [],
- };
- } else {
- tree.forEach((val, idx) => {
- if (
- v.parent &&
- !v.parent.parent &&
- val.text == v.parent.category
- ) {
- tree[idx].children.push({
- value: v.id,
- text: v.category,
- children: [],
- });
- } else if (v.parent.parent) {
- tree[idx].children.forEach((value, index) => {
- if (value.text == v.parent.category) {
- tree[idx].children[index].children.push({
- value: v.id,
- text: v.category,
- });
- }
- });
- }
- });
- }
- });
- if (!localStorage.getItem("category")) {
- let cate = that.modelData.incident.category;
- let cateGrand =
- cate.parentCategory &&
- cate.parentCategory.parentCategory &&
- cate.parentCategory.parentCategory.id;
- let cateFa = cate.parentCategory && cate.parentCategory.id;
- let cateSelf = cate.id;
- console.log(cate, tree);
- var i1 = 0,
- i2 = 0,
- i3 = 0;
- var selectedVal = [];
- var selectedIndex = [];
- var selectedTxt = [];
- tree.forEach((v, i) => {
- if (v.value == cateGrand) {
- selectedVal.push(v.value);
- selectedIndex.push(i);
- selectedTxt.push(v.text);
- v.children.forEach((va, ind) => {
- if (va.value == cateFa) {
- selectedVal.push(va.value);
- selectedIndex.push(ind);
- selectedTxt.push(va.text);
- va.children.forEach((val, idx) => {
- if (val.value == cateSelf) {
- selectedVal.push(val.value);
- selectedIndex.push(idx);
- selectedTxt.push(val.text);
- }
- });
- }
- });
- }
- });
- console.log(selectedVal, selectedIndex, selectedTxt);
- // console.log(i1,i2,i3);
- // var cateData=[i1,i2,i3]
- that.selectData = tree;
- // 获取事件分类并设置
- that.setCategory();
- that.categoryPicker = that.$createCascadePicker({
- title: "事件分类选择",
- data: that.selectData,
- selectedIndex: selectedIndex,
- onSelect: that.selectCategoryHandler,
- });
- setTimeout(() => {
- that.selectCategoryHandler(
- selectedVal,
- selectedIndex,
- selectedTxt
- );
- }, 500);
- } else {
- that.selectData = tree;
- // 获取事件分类并设置
- that.setCategory();
- that.categoryPicker = that.$createCascadePicker({
- title: "事件分类选择",
- data: that.selectData,
- selectedIndex: JSON.parse(localStorage.getItem("category")) || [
- 0, 0, 0,
- ],
- onSelect: that.selectCategoryHandler,
- });
- that.model.category = JSON.parse(
- localStorage.getItem("categoryVal")
- );
- }
- });
- },
- // 暂时存值
- setLocalStroageData() {
- var that = this;
- var a1 = [],
- a2 = [],
- a3 = [],
- category = [],
- solutionType = [],
- synergeticChecked = [];
- that.model.category.forEach(function (v, i) {
- if (v) {
- a1.push(v);
- }
- });
- category = a1;
- that.model.solutionType.forEach(function (v, i) {
- if (v) {
- a2.push(v);
- }
- });
- solutionType = a2;
- that.synergeticChecked.forEach(function (v, i) {
- a3.push({ id: v });
- });
- synergeticChecked = a3;
- that.modelData.incident.category = {
- id: category[category.length - 1],
- };
- that.modelData.loginUser = that.loginUser;
- if (that.order == 1) {
- // 直接处理
- that.modelData.handler_code = "resolve";
- that.modelData.msgflag = "申请关闭";
- that.modelData.submit = "申请关闭";
- that.modelData.incident.handleDescription =
- that.model.handleDescription;
- that.modelData.incident.handleCategory = {
- id: that.model.handleCategory,
- };
- that.modelData.incident.closecode = { id: that.model.closecode };
- that.modelData.isSolution = that.model.knowledge;
- that.modelData.bpm_activiti = {
- solutionType: {
- id: solutionType[solutionType.length - 1],
- },
- };
- // 协同
- that.modelData.incident.synergeticReason = that.model.synergeticReason;
- delete that.modelData.isupreason;
- delete that.modelData.examine;
- delete that.modelData.assignee;
- delete that.modelData.transferReason;
- that.modelData.incident.synergetic = synergeticChecked;
- } else if (that.order == 2) {
- // 升级
- that.modelData.handler_code = "function";
- that.modelData.msgflag = "升级";
- that.modelData.submit = "升级";
- that.modelData.isupreason = that.model.isupreason;
- that.modelData.assignee = that.model.handlerUser;
- that.modelData.examine = {
- upgradeAuditor: { id: that.modelData.assignee },
- };
- delete that.modelData.transferReason;
- delete that.modelData.incident.synergetic;
- delete that.modelData.incident.synergeticReason;
- if (that.modelData.isSolution) {
- delete that.modelData.isSolution;
- }
- } else if (that.order == 3) {
- // 转派
- that.modelData.handler_code = "forward";
- that.modelData.msgflag = "转派";
- that.modelData.submit = "转派";
- that.modelData.transferReason = that.model.transferReason;
- that.modelData.assignee = that.model.handlerUser;
- delete that.modelData.isupreason;
- delete that.modelData.examine;
- delete that.modelData.incident.synergetic;
- delete that.modelData.incident.synergeticReason;
- if (that.modelData.isSolution) {
- delete that.modelData.isSolution;
- }
- }
- that.model.fileUrl = "url";
- that.loadShow = true;
- },
- // 处理方案引入知识库
- referKnowledge() {
- var that = this;
- if (!that.model.handleDescription) {
- alert("请输入处理方案");
- return;
- }
- that.setLocalStroageData();
- localStorage.setItem("modelData", JSON.stringify(that.modelData));
- localStorage.setItem("model", JSON.stringify(that.model));
- localStorage.setItem("order", that.order);
- this.$router.push({
- name: "ReferenceList",
- params: { data: that.model.handleDescription },
- });
- },
- // 新增耗材
- addHcPost() {
- //添加耗材发送请求 start
- let data = JSON.parse(JSON.stringify(this.hcList));
- data.forEach((v) => {
- delete v.id;
- });
- return this.$http.post("service/cmdb/inOutStore/out", { data });
- //添加耗材发送请求 end
- },
- async basePost() {
- if (this.hcList.length) {
- let flag = this.hcList.every(
- (v) => v.consumablesSum && v.assetConsumablesId && v.extra1
- );
- if (!flag) {
- this.$createDialog({
- type: "alert",
- title: "请填写必填项",
- content: "耗材信息填写不完整",
- icon: "cubeic-wrong",
- }).show();
- return;
- }
- console.log(this.hcList);
- let re = await this.addHcPost();
- if (re.data.status != 200) {
- this.$createDialog({
- type: "alert",
- title: "提示",
- content: re.data.msg,
- icon: "cubeic-wrong",
- }).show();
- return;
- }
- }
- let that = this;
- if (this.order == 5) {
- that.$http
- .post(
- "service/bpm/bpm/delegateTask/" + that.modelData.incident.taskId,
- { assginee: that.model.handlerUser }
- )
- .then(function (res) {
- if (res.data) {
- $("#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();
- localStorage.removeItem("category");
- localStorage.removeItem("model");
- localStorage.removeItem("modelData");
- localStorage.removeItem("referenceInfo");
- localStorage.removeItem("solution");
- localStorage.removeItem("order");
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- } else {
- $("#fade").fadeIn();
- that.promptingConent = "系统错误,请稍后再试!";
- that.promptingStatus = false;
- that.loadShow = false;
- that.dialog = that
- .$createDialog({
- type: "alert",
- title: "系统错误,请稍后再试!",
- content: "点击返回首页",
- icon: "cubeic-wrong",
- onConfirm: (e, promptValue) => {
- that.$router.push({ path: "/main" });
- },
- })
- .show();
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- }
- });
- } else {
- that.$http
- .post(
- "service/bpm/bpm/completeTask/" +
- that.modelData.incident.taskId +
- "/" +
- that.loginUser.id,
- that.modelData
- )
- .then(function (res) {
- if (res.data) {
- setTimeout(function () {
- that.$refs.upload.start();
- }, 100);
- $("#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();
- localStorage.removeItem("category");
- localStorage.removeItem("model");
- localStorage.removeItem("modelData");
- localStorage.removeItem("referenceInfo");
- localStorage.removeItem("solution");
- localStorage.removeItem("order");
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- } else {
- $("#fade").fadeIn();
- that.promptingConent = "系统错误,请稍后再试!";
- that.promptingStatus = false;
- that.loadShow = false;
- that.dialog = that
- .$createDialog({
- type: "alert",
- title: "系统错误,请稍后再试!",
- content: "点击返回首页",
- icon: "cubeic-wrong",
- onConfirm: (e, promptValue) => {
- that.$router.push({ path: "/main" });
- },
- })
- .show();
- setTimeout(function () {
- $("#fade").fadeOut();
- }, 2000);
- }
- });
- }
- },
- // 提交
- submitHandler() {
- var that = this;
- that.setLocalStroageData();
- // that.modelData.incident.place = {
- // area:{
- // id:this.selectedAreaId,
- // area:this.selectedAreaName
- // },
- // id:this.selectedPlaceId,
- // place:this.selectedPlaceName
- // };//增加区域地点
- console.log(that.model, that.modelData, 11111);
- // console.log(this.selectedPlaceId,this.selectedAreaId,8888);//2020年4月25日16:12:55
- that.model.fileUrl = "url";
- that.loadShow = true;
- //填写了处理日志,并且是处理中状态
- if (
- that.handlerLog &&
- that.handlerLog.trim() &&
- that.modelData.incident.state.value == "handler"
- ) {
- that.$http
- .post("service/bpm/data/addData/operationLog", {
- operationLog: {
- opType: "handlerLog",
- opValue: that.handlerLog,
- extra1: that.modelData.incident.id,
- },
- })
- .then(function (result1) {
- that.basePost();
- });
- } else {
- that.basePost();
- }
- event.preventDefault();
- },
- validateHandler(result) {
- // console.log(result);
- this.validity = result.validity;
- this.valid = result.valid;
- // if (this.vali == true) {
- // $("#fade").fadeIn();
- // this.promptingConent = "提交失败,请填写必填信息!";
- // this.promptingStatus = false;
- // setTimeout(function() {
- // $("#fade").fadeOut();
- // }, 2000);
- // }
- // this.vali = false;
- },
- dateSelectHandler(selectedVal) {
- this.model.dateValue = new Date(
- selectedVal[0],
- selectedVal[1] - 1,
- selectedVal[2]
- ).toDateString();
- },
- filesAdded(files) {
- let hasIgnore = false;
- const maxSize = 1000 * 1024 * 1024; // 1M
- for (let k in files) {
- const file = files[k];
- if (file.size > maxSize) {
- file.ignore = true;
- hasIgnore = true;
- }
- }
- hasIgnore &&
- this.$createToast({
- type: "warn",
- time: 1000,
- txt: "不能上传超过100M的文件",
- }).show();
- // 暂停上传
- this.$refs.upload.pause();
- },
- fileSubmitted(files) {
- this.action.data = { fileName: files.name };
- },
- // 获取事件上绑定的耗材
- 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;
- }
- });
- },
- },
- created() {
- this.processInstanceId = this.$route.params.data
- ? this.$route.params.data.processInstanceId
- : JSON.parse(localStorage.getItem("modelData")).incident
- .processInstanceId;
- this.id = this.$route.params.data
- ? this.$route.params.data.id
- : JSON.parse(localStorage.getItem("modelData")).incident.id;
- this.action.target += this.processInstanceId;
- this.getParamsData();
- this.getHcs();
- if (this.incidentWithConsumable == 1) {
- this.getHcBySj();
- }
- this.getImgs();
- // 处理方式
- this.getHandleCategory();
- // 关闭代码
- this.getClosecode();
- // 升级对象
- this.getUpUser();
- // 指派对象
- this.getZpUser();
- // 转派对象
- this.getRotateUser();
- // 协同对象
- this.getSynerUser();
- // 获取页面数据
- this.getMessage();
- // 事件分类
- this.getIncidentcategory();
- },
- mounted() {
- console.log(this.modelData, this.model, 999);
- // 获取区域列表
- // this.getAreaList().then(res=>{
- // if(this.modelData.incident.place){
- // // 获取地点列表
- // this.getPlaceList(this.modelData.incident.place.area.id)
- // .then(res1=>{
- // this.selectedAreaId = this.modelData.incident.place.area.id;
- // this.selectedAreaName = this.modelData.incident.place.area.area;
- // this.model.selectArea = this.modelData.incident.place.area.id;
- // this.selectedPlaceId = this.modelData.incident.place.id;
- // this.selectedPlaceName = this.modelData.incident.place.place;
- // this.model.selectPlace = this.modelData.incident.place.id;
- // });
- // }
- // })
- },
- components: {
- CubePage,
- CubeButtonGroup,
- DatePicker,
- // JsonView
- CubeExtendPopup,
- LoadIng,
- PrompTing,
- // HandlerLog
- },
- };
- </script>
- <style>
- .hcList {
- display: flex;
- align-items: center;
- margin-top: 0.1rem;
- }
- .hcItem {
- flex: 4;
- margin: 0 0.05rem;
- }
- .hcItemClose {
- flex: 1;
- font-size: 0.4rem;
- }
- .addHc {
- width: 90%;
- height: 1rem;
- margin: 0 auto;
- border: 0.02rem solid #ccc;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .addHc .cubeic-add {
- font-size: 0.8rem;
- }
- .newIncident .cube-form-group {
- border-bottom: 0.02rem solid rgb(245, 245, 245);
- }
- .newIncident .sub .cube-btn {
- margin-top: 1.1rem;
- }
- .btn_plcaeholde .cube-btn {
- padding-left: 0;
- padding-right: 0;
- text-align: left;
- color: inherit;
- background: none;
- border: none;
- }
- .btn_plcaeholde .cube-btn:active {
- background-color: #fff;
- }
- .btn_plcaeholde .cube-btn::after {
- content: ">";
- float: right;
- margin-right: 0.15rem;
- }
- .cube-form_standard .cube-upload-def .cube-upload-btn,
- .cube-form_standard .cube-upload-def .cube-upload-file {
- margin-left: 3% !important;
- }
- .sub .cube-btn {
- background-color: #005395 !important;
- width: 90%;
- margin: 0 auto;
- border-radius: 8px;
- }
- .cube-picker-wheel-item {
- text-overflow: ellipsis;
- }
- </style>
- <style lang="less" scoped>
- .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;
- }
- .incidentTitle {
- .titleRefer {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .titleTxtArea {
- font-size: 0.3rem;
- color: #333;
- height: 2rem;
- width: 62%;
- &:focus {
- outline: none;
- }
- }
- .abtn {
- display: inline-block;
- width: 37%;
- text-align: center;
- height: 0.48rem;
- color: #005395;
- font-size: 0.28rem;
- }
- }
- }
- .form-custom {
- .cube-form-item {
- .cube-btn {
- padding-left: 0;
- padding-right: 0;
- text-align: left;
- color: inherit;
- background: none;
- border: none;
- }
- }
- }
- .label {
- background-color: rgb(238, 238, 238);
- height: 0.6rem;
- line-height: 0.6rem;
- 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;
- }
- }
- .zhidu {
- display: flex;
- height: 0.7rem;
- line-height: 0.7rem;
- border-bottom: 0.02rem solid rgb(245, 245, 245);
- div:nth-child(1) {
- width: 27.5%;
- padding-left: 6%;
- }
- }
- .bgColor {
- background-color: white;
- &.newIncident {
- padding-top: 1.84rem;
- }
- }
- .uplod {
- padding: 0 0.24rem;
- border-bottom: 0.02rem solid rgb(245, 245, 245);
- }
- .handleRadio {
- border-bottom: 0.02rem solid rgb(245, 245, 245);
- }
- .synerBox {
- height: 3rem;
- overflow: scroll;
- }
- 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;
- z-index: 9;
- div {
- width: 33.33%;
- text-align: center;
- &.p50 {
- width: 49.99%;
- }
- 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: 30%;
- color: #666;
- }
- .cube-textarea-wrapper {
- 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>
|