123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857 |
- <template>
- <div class="flex-box">
- <div :span="24" class="flex-header">
- <Tabs :tabList="tabListMain" @status="clickTabMains">
- </Tabs>
- <el-button v-if="clickTagName == 'first'" type="primary" @click="clickNewTag()">+新建</el-button>
- </div>
- <div class="flex-count">
- <Table v-loading="loading" @clickDemand="clickDemand" :list="lableTable" ref="TableList" @changeNum="changeNum">
- </Table>
- </div>
- <el-dialog :title="dialogTitle" :visible.sync="dialogStatus" width="100%" :before-close="handleClose" :modal="false"
- v-if="dialogStatus" :destroy-on-close="true">
- <!-- 后期维护 -->
- <div style="position: fixed; z-index: 10000;top: 55px;">
- <el-button type="primary" v-if="startStatus" @click="clickHandles">处理</el-button>
- <el-button type="primary" v-if="closeStatus" @click="handleClose">关闭</el-button>
- <el-button type="primary" v-if="saveStatus" @click="clickSave">保存</el-button>
- </div>
- <el-form ref="form" :model="fromList" :rules="rule" label-width="105px" style="margin-top: 30px">
- <div style="text-align: center; font-size: 24px;">互联网电视考核</div>
- <div class="flex-header">
- <el-form-item label="考核主题:" prop="needName">
- <el-input v-model="fromList.needName" :disabled="disabled"></el-input>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="发起人:">
- <el-input v-model="fromList.proposer" disabled></el-input>
- </el-form-item>
- <el-form-item label="发起时间:">
- <el-input v-model="fromList.proposerTime" disabled></el-input>
- </el-form-item>
- </div>
- <div class="" style="margin: 1%; border-bottom: 1px solid #e1e1e1;">
- <el-form-item label="考核说明:">
- <el-input type="textarea" v-model="fromList.assessmentDescription" maxlength="500" show-word-limit
- :disabled="disabled"></el-input>
- </el-form-item>
- </div>
- <div class="flex-header">
- <el-form-item label="考核模板:" prop="assessmentTemplate">
- <el-select v-model="fromList.assessmentTemplate" placeholder="请选择考核模板" size="medium"
- :disabled="disabled" @change="selectChanged">
- <el-option v-for="item in assessmentTemplateoption" :key="item.code" :label="item.name"
- :value="item.code" />
- </el-select>
- </el-form-item>
- <el-form-item label="当前得分:">
- <el-input v-model="fromList.currentScore" disabled></el-input>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate">
- <el-form-item v-if="fromList.assessmentTemplate != '1'" label="合作运营考核(100分,权重100%)">
- <el-button type="primary" style="float:left"
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
- @click="addNewHost1()">新增考核项</el-button>
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData1" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column prop="item" label="考核项目">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
- </span>
- <span v-else>{{ scope.row.item }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="detailed" label="考核细则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
- </span>
- <span v-else>{{ scope.row.detailed }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="content" label="考核内容">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
- </span>
- <span v-else>{{ scope.row.content }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="principle" label="考核原则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
- </span>
- <span v-else>{{ scope.row.principle }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="deductMarks" label="扣分标准">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
- </span>
- <span v-else>{{ scope.row.deductMarks }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="require" label="佐证要求">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
- </span>
- <span v-else>{{ scope.row.require }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="score" label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- oninput="value=value.replace(/[^\d.]/g,'')"
- @blur="onInputFocus1(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
- <template slot-scope="scope">
- <div style="display:flex">
- <el-button icon="el-icon-edit" type="text"
- @click="editX(scope.row, scope.$index)">{{
- scope.row.show ? '保存' : "修改" }}
- </el-button>
- <el-button type="text" @click="delectv(scope.$index, scope.row)">删除</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate">
- <el-form-item v-if="fromList.assessmentTemplate == '1'" label="合作运营考核(100分,权重50%)">
- <el-button type="primary" style="float:left"
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
- @click="addNewHost1()">新增考核项</el-button>
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData1" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column prop="item" label="考核项目">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
- </span>
- <span v-else>{{ scope.row.item }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="detailed" label="考核细则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
- </span>
- <span v-else>{{ scope.row.detailed }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="content" label="考核内容">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
- </span>
- <span v-else>{{ scope.row.content }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="principle" label="考核原则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
- </span>
- <span v-else>{{ scope.row.principle }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="deductMarks" label="扣分标准">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
- </span>
- <span v-else>{{ scope.row.deductMarks }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="require" label="佐证要求">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
- </span>
- <span v-else>{{ scope.row.require }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="score" label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- @input="numDxsCheck(fromList.content1.tableData1[scope.$index], 1, 'score')"
- @blur="onInputFocus1(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
- <template slot-scope="scope">
- <div style="display:flex">
- <el-button icon="el-icon-edit" type="text"
- @click="editv(scope.row, scope.$index)">{{
- scope.row.show ? '保存' : "修改" }}
- </el-button>
- <el-button type="text" @click="delectv(scope.$index, scope.row)">删除</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate == '1'">
- <el-form-item label="业务质量考核(100分,权重50%):">
- <el-button type="primary" style="float:left"
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'"
- @click="addNewHost2()">新增考核项</el-button>
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData2" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column prop="item" label="考核项目">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.item"></el-input>
- </span>
- <span v-else>{{ scope.row.item }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="detailed" label="考核细则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.detailed"></el-input>
- </span>
- <span v-else>{{ scope.row.detailed }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="content" label="考核内容">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.content"></el-input>
- </span>
- <span v-else>{{ scope.row.content }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="principle" label="考核原则">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.principle"></el-input>
- </span>
- <span v-else>{{ scope.row.principle }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="deductMarks" label="扣分标准">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.deductMarks"></el-input>
- </span>
- <span v-else>{{ scope.row.deductMarks }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="require" label="佐证要求">
- <template slot-scope="scope">
- <span v-if="scope.row.show">
- <el-input type="textarea" size="mini" v-model="scope.row.require"></el-input>
- </span>
- <span v-else>{{ scope.row.require }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="score" label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- @input="numDxsCheck(fromList.content1.tableData2[scope.$index], 1, 'score')"
- @blur="onInputFocus2(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- <el-table-column label="操作" v-if="dialogTitle == '新建工单' || fromList.taskName == '起草'">
- <template slot-scope="scope">
- <div style="display:flex">
- <el-button icon="el-icon-edit" type="text"
- @click="editw(scope.row, scope.$index)">{{
- scope.row.show ? '保存' : "修改" }}
- </el-button>
- <el-button type="text" @click="delectw(scope.$index, scope.row)">删除</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate">
- <el-form-item label="合作运营加分(上限5分,当月有效):">
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData3" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column v-for="(value, index) in fromList.content1.tableCol3" :key="index"
- :prop="value.prop" :label="value.label" align="center">
- </el-table-column>
- <el-table-column label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- @input="numDxsCheck(fromList.content1.tableData3[scope.$index], 1, 'score')"
- @blur="onInputFocus3(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate == '1'">
- <el-form-item label="网络协同加分(上限5分,当月有效):">
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData4" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column v-for="(value, index) in fromList.content1.tableCol4" :key="index"
- :prop="value.prop" :label="value.label" align="center">
- </el-table-column>
- <el-table-column label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- @input="numDxsCheck(fromList.content1.tableData4[scope.$index], 1, 'score')"
- @blur="onInputFocus4(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="" v-if="fromList.assessmentTemplate">
- <el-form-item label="《违约行为》对标考核(-100分):">
- <el-table class="com-table" :key="Date.now()" ref="multipleTable"
- :data="fromList.content1.tableData5" tooltip-effect="dark" size="mini" border
- style="width: 100%">
- <el-table-column v-for="(value, index) in fromList.content1.tableCol5" :key="index"
- :prop="value.prop" :label="value.label" align="center">
- </el-table-column>
- <el-table-column label="考核得分">
- <template slot-scope="scope">
- <span
- v-if="dialogTitle == '新建工单' || fromList.taskName == '起草' || fromList.taskName == '发起考核'">
- <el-input size="mini" type="text" :precision="0" v-model="scope.row.score"
- @input="numDxsCheck(fromList.content1.tableData5[scope.$index], 1, 'score')"
- @blur="onInputFocus5(scope.$index, scope.row.score)"></el-input>
- </span>
- <span v-else>{{ scope.row.score }}</span>
- </template>
- </el-table-column>
- </el-table>
- </el-form-item>
- </div>
- <div class="flex-load" style="display: flex; flex-direction: column">
- <el-form-item label="附件:" prop="accessoryList">
- <my-upload @uploadBack="uploadBack" @delloadBack="delloadBack"
- @clickDownload="download" :fileInfo="fileInfo" :fileList="fromList.accessoryList"
- style="width: 30% !important"></my-upload>
- <!-- <div v-if="fromList.taskName != '初评'">
- <div v-for="(item, index) in fromList.accessoryList" :key="index">
- <span style="color: blue;cursor: pointer;" @click="downloadOne(item)">{{
- item.fileName
- }}</span>
- </div>
- </div> -->
- </el-form-item>
- </div>
- </el-form>
- <div>
- <div class="table-title">流程追踪</div>
- <TableId :list="lables"></TableId>
- </div>
- </el-dialog>
- <div v-if="destroy">
- <el-dialog title="处理操作" width="100%" :visible.sync="handleStatus" :before-close="handleCloses" :modal="false"
- v-if="handleStatus" :destroy-on-close="true">
- <Workflow :list="fromList" v-if="isWorkflowStatus == true" @updateForm="updateForm"
- :requestForm="requestForm" :adminResourceId="adminResourceId" :request_formTitle="request_form.title"/>
- <WorkflowEntrance :list="fromList" v-else :lastManList="lastManList" @beforeClose="updateForm"
- :requestForm="requestForm" :request_formTitle="request_form.title"/>
- <!-- 后期维护 -->
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import Tabs from "../../../components/el-tabs";
- import Table from "../../../components/el-form";
- import TableId from "../../../components/el-formid";
- import Seach from "../../../components/el-search";
- import myUpload from "../../../components/workflowUpload";
- import Workflow from "../../../components/workflowBase";
- import WorkflowEntrance from "../../../components/workflowEntrance";
- import getConfig from '../../../config/dev.js'
- import {
- getTodoBase,
- getDoneBase,
- getInitiateBase,
- getNowdata,
- } from "../../../http/api.js";//../../../http/api.js
- import { log } from "console";
- export default {
- components: {
- Table,
- TableId,
- Tabs,
- myUpload,
- Workflow,
- Seach,
- WorkflowEntrance
- },
- data() {
- let _self = this
- return {
- loading: false,
- isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
- lastManList: [],
- rule: {
- needName: [
- { required: true, message: "请添加考核主题", trigger: "blur" },
- ],
- assessmentTemplate: [
- { required: true, message: "请选择考核模板", trigger: "change" },
- ],
- },
- form: {
- }, //表单数据
- fromList: {
- }, //表单数据
- fileInfo: {
- type: "bt1n",
- typename: "上传文件",
- // limit: 5,
- url: "/market/waf/uploadByMinio",
- fileList: [],
- },
- list: {},
- assessmentTemplateoption: [],
- disabled: false,
- pageNo: 1,//页码
- destroy: false,//处理
- handleStatus: false,//处理
- tableName: "hlw_dskh_process",
- request_form: {
- userId: "",
- userName: "",
- path: this.$router.currentRoute.name,
- userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
- // path:this.$roter.options.routers,
- // nextDealMan:'',
- title: "title",
- businessKey: "1",
- processDefinitionKey: "hlw_dskh_process",//流程key
- },
- requestForm: {
- // fresourceId: "87753452-c2f3-11ed-9c8b-d6cd97160e00", // 本地环境
- // fresourceId: "canvas", // 生产环境
- // fresourceId: "d4092f5e-c49b-11ed-a8d3-00505687dcd3", //测试91环境
- fresourceId: getConfig().internetAssessment,
- processDefinitionKey: "hlw_dskh_process",
- },
- dialogStatus: false, //dialog显示
- dialoglablesStatus: true, //dialogL流程追踪显示
- clickTagNameTop: 'First',//头部tab
- clickTagName: 'first',
- dialogTitle: '',//dialogtit
- startStatus: false,//处理状态按钮
- closeStatus: false, //关闭按钮状态
- saveStatus: false, //保存按钮状态
- lables: {
- height: "400",
- titledata: [
- {
- label: "环节名称",
- prop: "taskName",
- width: 300,
- },
- {
- label: "处理人",
- prop: "assignee",
- width: 300,
- },
- {
- label: "到达时间",
- prop: "startTime",
- width: 300,
- },
- {
- label: "处理时间",
- prop: "endTime",
- width: 300,
- },
- {
- label: "回复意见",
- prop: "content",
- width: 300,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 0, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: true, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- tabListMain: [
- {
- index: "first",
- label: "我的待办",
- number: 1,
- name: "prosss_key",
- },
- {
- index: "two",
- label: "我的已办",
- number: 2,
- },
- {
- index: "three",
- label: "我发起的",
- number: 3,
- },
- ],
- lableTable: {},//传给子组件table
- firstlabel: {
- height: "400",
- titledata: [
- {
- label: "考核主题",
- prop: "need_name",
- width: 400,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 400,
- },
- {
- label: "发起部门",
- prop: "apply_dept",
- width: 300,
- },
- {
- label: "发起科室",
- prop: "apply_department",
- width: 300,
- },
- {
- label: "发起时间",
- prop: "proposer_time",
- width: 400,
- },
- {
- label: "当前环节",
- prop: "taskName",
- width: 400,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- twolabel: {
- height: "400",
- titledata: [
- {
- label: "考核主题",
- prop: "need_name",
- width: 400,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 400,
- },
- {
- label: "发起部门",
- prop: "apply_dept",
- width: 300,
- },
- {
- label: "发起科室",
- prop: "apply_department",
- width: 300,
- },
- {
- label: "发起时间",
- prop: "proposer_time",
- width: 400,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- threelabel: {
- height: "400",
- titledata: [
- {
- label: "考核主题",
- prop: "need_name",
- width: 400,
- },
- {
- label: "发起人",
- prop: "proposer",
- width: 400,
- },
- {
- label: "发起部门",
- prop: "apply_dept",
- width: 300,
- },
- {
- label: "发起科室",
- prop: "apply_department",
- width: 300,
- },
- {
- label: "发起时间",
- prop: "proposer_time",
- width: 400,
- },
- {
- label: "当前环节",
- prop: "taskName",
- width: 400,
- },
- ], //表格头
- data: [], //内容数据
- loading: true,
- pageData: {
- total: 10, // 总条数
- pageSizes: 10, // 每页数量
- pageNum: 1, // 页码
- },
- isSelection: false, // 表格有多选时设置
- isOperation: false, // 表格有操作列时设置
- isIndex: false, // 列表序号
- operation: {
- // 表格有操作列时设置
- label: "操作", // 列名
- width: "50", // 根据实际情况给宽度
- data: [
- {
- label: "操作", // 操作名称
- type: "", //按钮类型
- handleRow: function () { }, // 自定义事件
- },
- ],
- },
- },
- savestatusBtn: false,
- adminResourceId: "", //转派多人id
- }
- },
- created() {
- let status = JSON.stringify(this.$route.query) == "{}";
- if (status) {
- this.lableTable = this.firstlabel
- this.getQueryList()
- this.usernumber()
- } else {
- let { id, type } = this.$route.query;
- let list = {
- taskId: id,
- tableName: this.tableName
- };
- this.usernumber()
- this.lableTable = this.firstlabel
- this.getQueryList(list, 0);//代办
- }
- },
- mounted() {
- ///HlwDskhProcess/queryAssessmentTemplateList
- this.$http({
- url: "/market/HlwDskhProcess/queryAssessmentTemplateList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- console.log(res);
- this.assessmentTemplateoption = res.data
- })
- },
- methods: {
- selectChanged(val) {
- console.log(val);
- this.fromList.assessmentTemplate = '1'
- this.assessmentTemplateoption.map((item) => {
- if (val == item.code) {
- console.log(JSON.parse(item.value));
- if (val == '1') {
- this.fromList.content1 = JSON.parse(item.value)
- this.fromList.content1.tableData1.map((item) => {
- item.show = false;
- })
- this.fromList.content1.tableData2.map((item) => {
- item.show = false;
- })
- } else {
- let a = JSON.parse(item.value)
- this.$set(this.fromList.content1, 'tableData1', a.tableData1)
- this.$set(this.fromList.content1, 'tableData3', a.tableData2)
- this.$set(this.fromList.content1, 'tableData5', a.tableData3)
- this.$set(this.fromList.content1, 'tableCol3', a.tableCol2)
- this.$set(this.fromList.content1, 'tableCol5', a.tableCol3)
- this.fromList.content1.tableData1.map((item) => {
- item.show = false;
- })
- }
- }
- })
- this.fromList.assessmentTemplate = val
- this.fromList.currentScore = 0.0
- // if (val == '1') { a
- // this.fromList.content1.tableData1 = [
- // { time: '2020-08-10', grade: 'niuniu', name: '小明', subjects: '语文', score: 0, },
- // ]
- // this.fromList.content1.tableData2 = [
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // ]
- // this.fromList.content1.tableData3 = [
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // ]
- // this.fromList.content1.tableData4 = [
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // ]
- // this.fromList.content1.tableData5 = [
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // { time: '2020-08-11', grade: '三年三班', name: '小花', subjects: '数学', score: 0 },
- // ]
- // this.fromList.content1.tableCol3 = [
- // { prop: 'time', label: '时间' },
- // { prop: 'grade', label: '工号' },
- // { prop: 'name', label: '姓名' },
- // { prop: 'subjects', label: '科目' },
- // { prop: 'score', label: '分数' },
- // ]
- // this.fromList.content1.tableCol4 = [
- // { prop: 'time', label: 'jianfen' },
- // { prop: 'grade', label: '工号' },
- // ]
- // this.fromList.content1.tableCol5 = [
- // { prop: 'time', label: 'jianfen' },
- // { prop: 'grade', label: '工号' },
- // { prop: 'name', label: '部门' },
- // ]
- // }
- },
- clickNewTag(v) {
- this.$http({
- url: "/sysmgr/csysdept/queryGroupListByLoginNo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- this.fromList = {
- proposer: JSON.parse(window.sessionStorage.getItem('userInfo')).loginName,
- proposerNo: JSON.parse(window.sessionStorage.getItem('userInfo')).loginNoStr,
- proposerTime: getNowdata({ a: '-', b: ' ', c: ':' }),
- currentScore: 0,
- content1: {},
- assessmentTemplate: '',
- }
- let accessoryList = [];
- accessoryList = v;
- this.$set(this.fromList, "accessoryList", accessoryList);
- this.lables.data = []
- this.startStatus = true;
- this.saveStatus = true;
- this.closeStatus = true;
- this.dialogStatus = true;
- this.isWorkflowStatus = true;
- this.dialogTitle = "新建工单";
- this.disabled = false;
- let a = res.data[0].description.split('/')
- if (a.length == 3) {
- this.fromList.applyDept = a[1]
- this.fromList.applyDepartment = a[2]
- } else {
- this.fromList.applyDept = a[1]
- this.fromList.applyDepartment = a[1]
- }
- });
- },
- //是否最后一个人
- async getLastName() {
- console.log(this.fromList);
- let list = {
- procinstid: this.fromList.processId,
- taskid: this.fromList.taskId,
- // taskId:e.taskId
- };
- let _this = this;
- let obj = {
- url: this.$url.formList.getLastName, //流程追踪接口
- data: list,
- // status: "form",
- headers: {
- "Content-Type": "application/json",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- console.log('panduan');
- if (data.lastMan == true) {
- _this.adminResourceId = data.adminResourceId;
- }
- _this.isWorkflowStatus = data.lastMan == false ? false : true;
- _this.lastManList = data;
- console.log(_this.isWorkflowStatus);
- }
- },
- downloadOne(e) {
- let list = {
- id: e.fileCode,
- fileName: e.fileName,
- };
- this.$http({
- url: "/market/waf/downFileByMinio",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: list,
- }).then((response) => {
- console.log(response);
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
- window.navigator.msSaveOrOpenBlob(
- blob,
- list.fileName
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download =
- list.fileName;
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- },
- download(e) {
- let list = {
- id: e.fileCode,
- fileName: e.name,
- };
- this.$http({
- url: "/market/waf/downFileByMinio",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- responseType: "blob",
- data: list,
- }).then((response) => {
- console.log(response);
- if (window.navigator && window.navigator.msSaveOrOpenBlob) {
- let blob = new Blob([response.data], {
- type: "application/vnd.ms-excel",
- });
- //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
- window.navigator.msSaveOrOpenBlob(
- blob,
- list.fileName
- );
- } else {
- /* 火狐谷歌的文件下载方式 */
- var blob = new Blob([response.data]);
- var downloadElement = document.createElement("a");
- var href = window.URL.createObjectURL(blob);
- downloadElement.href = href;
- downloadElement.download =
- list.fileName;
- document.body.appendChild(downloadElement);
- downloadElement.click();
- document.body.removeChild(downloadElement);
- window.URL.revokeObjectURL(href);
- }
- });
- },
- //上传文件钩子函数
- clickUpload(file) { },
- uploadBack(v) {
- if (this.fromList.accessoryList) {
- this.fromList.accessoryList = [];
- this.fromList.accessoryList = v;
- } else {
- let accessoryList = [];
- accessoryList = v;
- this.$set(this.fromList, "accessoryList", accessoryList);
- }
- },
- delloadBack(v) {
- this.fromList.accessoryList = v;
- },
- //获取页码
- changeNum(e) {
- console.log(e)
- this.pageNo = e;
- if (this.clickTagName == 'first') {
- this.firstlabel.pageData.pageNum = e;
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.twolabel.pageData.pageNum = e;
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.threelabel.pageData.pageNum = e;
- this.getMeLaunch()
- }
- },
- //点击工单状态跳转需求流程显示页面
- clickDemand(e, res) {
- console.log(e);
- this.isWorkflowStatus = true
- console.log(res);
- if (e === "考核主题") {
- if (this.clickTagName === "three") {//发起
- console.log(res.taskName)
- this.dialogTitle = "查看";
- this.closeStatus = true;
- if (res.taskName == "起草") {
- this.disabled = false;
- this.startStatus = true;
- this.saveStatus = true;
- } else {
- this.disabled = true;
- this.startStatus = false;
- this.saveStatus = false;
- }
- }
- if (this.clickTagName === "first") {//代办
- this.dialogTitle = "处理";
- if (res.taskName == "起草") {
- this.savestatusBtn = false
- this.disabled = false;
- this.startStatus = true;
- this.saveStatus = true;
- this.closeStatus = true;
- } else {
- this.savestatusBtn = true
- this.disabled = true;
- this.closeStatus = true;
- this.startStatus = true;
- this.saveStatus = false;
- }
- }
- if (this.clickTagName === "two") {//已办
- this.dialogTitle = "查看";
- this.closeStatus = true;
- this.startStatus = false;
- this.saveStatus = false;
- this.disabled = true;
- }
- this.dialogStatus = true
- this.fromList = res;
- this.clickForm(res);
- this.getFromQuery(res);
- }
- },
- //查询form表单数据
- getFromQuery(e) {
- this.$http({
- url: "/market/HlwDskhProcess/query",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: { id: e.id },
- }).then((res) => {
- this.fromList = res.data;
- this.dialogStatus = true;
- this.fromList.taskId = e.taskId
- this.fromList.taskName = e.taskName
- this.fromList.createId = e.createId
- if (this.fromList.accessoryList) {
- this.fromList.accessoryList.map((item) => {
- item.name = item.fileName;
- })
- }
- this.fromList.content1 = JSON.parse(this.fromList.content);
- this.fromList.content1.tableData1.map((item) => {
- item.show = false;
- })
- if (this.fromList.content1.tableData2) {
- this.fromList.content1.tableData2.map((item) => {
- item.show = false;
- })
- }
- this.fromList.resourceId = e.resourceId
- console.log(this.fromList);
- });
- },
- async clickForm(e) {
- let list = {
- processInstanceId: e.process_id,
- // taskId:e.taskId
- };
- let _this = this;
- let obj = {
- url: this.$url.formList.getCommentsByProcessId, //流程追踪接口
- data: list,
- headers: {
- "Content-Type": "application/json",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- console.log('[ 接口返回值第一曾 ] >', data)
- let list = [];
- list = data.data.data;
- if (data.data.lastmandata.length != 0) {
- data.data.lastmandata.map((item, index) => {
- item.id = index + 22;
- });
- }
- list.map((item, index) => {
- item.startTime = _this.$util.datetimeFormat(item.startTime);
- item.endTime = _this.$util.datetimeFormat(item.endTime);
- item.id = index + 1;
- item.children = [];
- if (data.data.lastmandata.length != 0) {
- let indexs = data.data.lastmandata.findIndex((items) => {
- if (items.taskId == item.taskId) {
- item.children.push(items);
- }
- });
- }
- });
- console.log(list);
- _this.lables.data = list;
- console.log("[ _this.lables.data ] >", _this.lables.data);
- _this.abc = true;
- }
- },
- handleClose() {//关闭弹窗
- this.dialogStatus = false;
- this.fromList = {};
- },
- async clickSave() {
- this.$refs.form.validate((valid) => {
- if (valid) {
- console.log(this.$refs.form.model)
- this.savestatusBtn = true
- if (this.fromList.id) {
- if (this.fromList.accessoryList) {
- this.fromList.accessoryIdList = []
- this.fromList.accessoryList.map((item) => {
- this.fromList.accessoryIdList.push(item.id);
- })
- }
- this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
- this.request_form.title = '[市场工作台]-互联网电视考核-' + this.fromList.needName;
- this.$http({
- url: "/market/HlwDskhProcess/update",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.fromList,
- }).then((res) => {
- if (res.data.result === 0) {
- this.$message.success("表单更新成功");
- }
- });
- } else {
- this.getUserIds();
- }
- } else {
- this.$message.error("请完善表单信息");
- return false;
- }
- });
- },
- //获取自己idname
- getUserIds() {
- this.$http({
- url: "/market/api/user/info/queryNodePers?params=" + JSON.parse(window.sessionStorage.userInfo).loginNo,
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- }).then((res) => {
- this.request_form.userName = res.data[0].children[0].loginNameStr;
- this.request_form.userId = res.data[0].children[0].loginNoStr;
- this.setForm();
- // console.log(this.request_form)
- });
- },
- setForm(e) {
- this.request_form.title = '[市场工作台]-互联网电视考核-' + this.fromList.needName;
- this.fromList.accessoryIdList = []
- // console.log(this.fromList.accessoryList);
- if (this.fromList.accessoryList) {
- this.fromList.accessoryList.map((item) => {
- this.fromList.accessoryIdList.push(item.id);
- })
- }
- // console.log(this.$refs.form.model);
- // console.log(JSON.stringify(this.$refs.form.model.content1));
- this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
- this.$http({
- url: "/market/HlwDskhProcess/add",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.fromList,
- }).then((res) => {
- this.request_form.businessKey = res.data.body;
- this.fromList.id = res.data.body;
- this.formWorkId = res.data.body;
- this.clickHandle(res.data.body);
- });
- },
- async clickHandle(e) {
- let _this = this;
- let obj = {
- url: this.$url.formList.startWork, //开始工作流接口
- data: _this.request_form,
- status: "form",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- },
- };
- let res = await this.common.httpPost(obj, success);
- function success(data) {
- // console.log(data);
- _this.fromList.taskId = data.data;
- _this.fromList.processId = data.data;
- // _this.fromList.resourceId = data.data;
- _this.taskId = data.data;
- // _this.fromList.taskId = data;
- // _this.taskId = data;
- let list = {
- id: e,
- // taskId:_this.formId,
- processId: _this.fromList.taskId,
- tableName: _this.request_form.processDefinitionKey,
- };
- _this.setUpdate(list);
- }
- },
- //更新工作流接口
- setUpdate(e) {
- this.$http({
- url: "/market/waf/updateBase",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: e,
- }).then((res) => {
- this.fromList.taskId = res.data.body[0].taskId;
- this.fromList.taskName = res.data.body[0].taskName;
- // if (res.data.body.taskName === "起草") {
- // this.isSync = res.data.body.isSync;
- // } else {
- // this.isSync = "1";
- // }
- if (res.data.result === 0) {
- this.$message.success("工作流更新成功");
- }
- });
- },
- //处理按钮,开始工作流接口
- clickHandles() {
- this.getNextPath(this.fromList.resourceId || "");
- console.log(this.fromList);
- if (this.fromList.taskName == '发起考核' || this.fromList.taskName == '初评') {
- if (this.fromList.accessoryList) {
- this.fromList.accessoryIdList = []
- this.fromList.accessoryList.map((item) => {
- this.fromList.accessoryIdList.push(item.id);
- })
- }
- this.fromList.content = JSON.stringify(this.$refs.form.model.content1);
- this.$http({
- url: "/market/HlwDskhProcess/update",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: this.fromList,
- }).then((res) => {
- if (res.data.result === 0) {
- this.$message.success("表单更新成功");
- }
- });
- }
- },
- getNextPath(e) {
- let list = {
- fresourceId: this.requestForm.fresourceId, // 本地环境
- processId: this.requestForm.processDefinitionKey,
- // processId: "request_form_process",
- // resourceId: e,
- };
- if (e) {
- // this.propsList = [];
- list.resourceId = e;
- }
- console.log(11111);
- console.log(list);
- console.log(11111);
- this.$http({
- url: "/market/waf/queryPath",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: list,
- }).then((res) => {
- console.log(res);
- console.log(this.fromList);
- console.log(res.data.body);
- console.log(res.data.body.nextShapes[0].multi);
- if (res.data.body.nextShapes[0].multi) {
- if (res.data.body.nextShapes[0].multi.multi === "true") {
- console.log('这是mulit节点');
- this.getLastName();
- } else {
- this.adminResourceId = ''
- console.log('这不是mulit节点');
- this.destroy = true;
- this.handleStatus = true;
- this.getMetirialType();
- }
- }
- if (this.fromList.taskId || this.fromList.processId) {
- this.adminResourceId = ''
- console.log('这不是mulit节点');
- this.destroy = true;
- this.handleStatus = true;
- this.getMetirialType();
- } else {
- this.$message.error("请先点击保存按钮");
- }
- });
- },
- //获取字典表常用意见
- getMetirialType(e) {
- this.$http({
- url: "/market/cfgDataDict/queryList",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- dictCodePks: "approval",
- },
- }).then((res) => {
- this.commonlyList = res.data;
- });
- },
- //处理关闭
- handleCloses() {
- // this.treeList = [];
- // this.textarea = "";
- this.handleStatus = false;
- this.usernumber()
- },
- updateForm() {
- this.dialogStatus = false;
- this.handleCloses();
- this.usernumber()
- if (this.clickTagName == 'first') {
- this.lableTable = this.firstlabel
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.lableTable = this.twolabel
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.lableTable = this.threelabel
- this.getMeLaunch()
- }
- },
- clickTabMains(e) {
- console.log(e);
- this.clickTagName = e
- this.pageNo = 1
- this.$refs.TableList.page = 1;
- if (this.clickTagName == 'first') {
- this.lableTable = this.firstlabel
- this.getQueryList();
- }
- if (this.clickTagName == 'two') {
- this.lableTable = this.twolabel
- this.getQueryDone();
- }
- if (this.clickTagName == 'three') {
- this.lableTable = this.threelabel
- this.getMeLaunch()
- }
- },
- adminhandleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- adminhandleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- },
- //我的待办
- getQueryList(e, status) {
- this.loading = true;
- getTodoBase(this.pageNo, "", e || { tableName: this.tableName }).then((res) => {
- if (status === 0) {
- this.clickDemand("考核主题", res.data.data[0]);
- }
- this.lableTable.data = res.data.data;
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[0].number = res.data.totalRecord
- this.loading = false;
- });
- },
- //我的已办
- getQueryDone() {
- this.loading = true;
- getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.lableTable.data = res.data.data;
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[1].number = res.data.totalRecord
- this.loading = false;
- });
- },
- //我发起的
- getMeLaunch() {
- this.loading = true;
- getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.lableTable.data = res.data.data;
- this.lableTable.pageData.total = res.data.totalRecord;
- this.tabListMain[2].number = res.data.totalRecord
- this.loading = false;
- });
- },
- usernumber() {
- getInitiateBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.tabListMain[2].number = res.data.totalRecord
- });
- getDoneBase(this.pageNo, "", { tableName: this.tableName, }).then((res) => {
- this.tabListMain[1].number = res.data.totalRecord
- });
- getTodoBase(this.pageNo, "", { tableName: this.tableName }).then((res) => {
- this.tabListMain[0].number = res.data.totalRecord
- });
- },
- onInputFocus(i, v) {
- let a = 0.00
- console.log(a);
- if (this.fromList.assessmentTemplate == '1') {
- this.fromList.content1.tableData1.map((item, index) => {
- a += parseFloat(item.score)
- })
- this.fromList.content1.tableData2.map((item, index) => {
- a += parseFloat(item.score)
- })
- a = a / 2
- this.fromList.content1.tableData3.map((item, index) => {
- a += parseFloat(item.score)
- })
- this.fromList.content1.tableData4.map((item, index) => {
- a += parseFloat(item.score)
- })
- this.fromList.content1.tableData5.map((item, index) => {
- a -= parseFloat(item.score)
- })
- } else {
- this.fromList.content1.tableData1.map((item, index) => {
- a += parseFloat(item.score)
- })
- this.fromList.content1.tableData3.map((item, index) => {
- a += parseFloat(item.score)
- })
- this.fromList.content1.tableData5.map((item, index) => {
- a -= parseFloat(item.score)
- })
- }
- console.log(a.toFixed(2));
- this.$set(this.fromList, 'currentScore', a.toFixed(2))
- },
- onInputFocus1(i, v) {
- if (v == '') {
- this.fromList.content1.tableData1.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- this.onInputFocus()
- },
- onInputFocus2(i, v) {
- if (v == '') {
- this.fromList.content1.tableData2.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- this.onInputFocus()
- },
- onInputFocus3(i, v) {
- if (v == '') {
- this.fromList.content1.tableData3.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- let a = 0
- this.fromList.content1.tableData3.map((item, index) => {
- a += parseFloat(item.score)
- })
- if (a > 5) {
- this.$message({
- message: "总数不能大于5",
- type: "error",
- });
- this.fromList.content1.tableData3.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- this.onInputFocus()
- },
- onInputFocus4(i, v) {
- if (v == '') {
- this.fromList.content1.tableData4.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- let a = 0
- this.fromList.content1.tableData4.map((item, index) => {
- a += parseFloat(item.score)
- })
- if (a > 5) {
- this.$message({
- message: "总数不能大于5",
- type: "error",
- });
- this.fromList.content1.tableData4.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- this.onInputFocus()
- },
- onInputFocus5(i, v) {
- if (v == '') {
- this.fromList.content1.tableData5.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- let a = 0
- this.fromList.content1.tableData5.map((item, index) => {
- a += parseFloat(item.score)
- })
- if (a > 100) {
- this.$message({
- message: "总数不能大于100",
- type: "error",
- });
- this.fromList.content1.tableData5.map((item, index) => {
- if (i == index) {
- item.score = 0
- }
- })
- }
- this.onInputFocus()
- },
- editX(row, index) {
- console.log(this.fromList.content1.tableData1);
- row.show = row.show ? false : true
- console.log(row);
- this.$set(this.fromList.content1.tableData1, index, row)
- },
- editv(row, index) {
- row.show = row.show ? false : true
- this.$set(this.fromList.content1.tableData1, index, row)
- },
- editw(row, index) {
- row.show = row.show ? false : true
- this.$set(this.fromList.content1.tableData2, index, row)
- },
- delectv(index, row) {
- this.$confirm("即将删除数据, 是否删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.fromList.content1.tableData1.splice(index, 1);
- })
- .catch(() => { });
- },
- delectw(index, row) {
- this.$confirm("即将删除数据, 是否删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.fromList.content1.tableData2.splice(index, 1);
- })
- .catch(() => { });
- },
- addNewHost1() {
- this.fromList.content1.tableData1.push({
- item: '',
- detailed: '',
- content: '',
- principle: '',
- deductMarks: '',
- require: '',
- show: true,
- score: 0
- })
- },
- addNewHost2() {
- this.fromList.content1.tableData2.push({
- item: '',
- detailed: '',
- content: '',
- principle: '',
- deductMarks: '',
- require: '',
- show: true,
- score: 0
- })
- },
- numDxsCheck(form, ws, key) {
- // console.log(form);
- // console.log(key);
- if (key === undefined) {
- key = "cost";
- }
- form[key] = form[key] + "";
- //先把非数字的都替换掉,除了数字和.
- form[key] = form[key].replace(/[^\d.]/g, "");
- //必须保证第一个为数字而不是.
- form[key] = form[key].replace(/^\./g, "");
- //保证只有出现一个.而没有多个.
- form[key] = form[key].replace(/\.{2,}/g, ".");
- //保证.只出现一次,而不能出现两次以上
- form[key] = form[key].replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
- //只能输入4个小数
- // let c = null;
- let c = /^(\-)*(\d+)\.(\d{1}).*$/;
- // switch (ws) {
- // case 1:
- // c = /^(\-)*(\d+)\.(\d).*$/;
- // case 2:
- // c = /^(\-)*(\d+)\.(\d\d).*$/;
- // break;
- // case 3:
- // c = /^(\-)*(\d+)\.(\d\d\d).*$/;
- // break;
- // case 4:
- // c = /^(\-)*(\d+)\.(\d\d\d\d).*$/;
- // break;
- // default:
- // c = /^(\-)*(\d+)\.(\d\d).*$/;
- // }
- //只能输入两个小数
- form[key] = form[key].replace(c, '$1$2.$3');
- // console.log(form[key]);
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .copyClass {
- display: flex;
- }
- .flex-header-text-tree {
- width: 50%;
- text-align: center;
- }
- ::v-deep .el-form-item {
- width: 100%;
- }
- .active {
- background-color: #f3faff;
- }
- .flex-common {
- padding: 10px 5%;
- font-size: 18px;
- }
- .flex-buttons {
- background-color: #cde4f6;
- border-color: #cde4f6;
- color: #606266;
- }
- .flex-button {
- margin-top: 10px;
- margin-bottom: 10px;
- ::v-deep .el-button--primary {
- width: 222px;
- }
- }
- .flex-left-header-text {
- height: 40px;
- line-height: 40px;
- color: black;
- padding-left: 10px;
- background-color: #cde4f6;
- font-size: 18px;
- font-weight: bold;
- }
- .flex-right-text {
- margin-right: 20px;
- width: 50%;
- }
- .flex-handle {
- width: 100%;
- padding: 30px;
- display: flex;
- .flex-right {
- width: 50%;
- border: 1px solid #e1e1e1;
- margin-left: 20px;
- }
- .flex-left {
- width: 50%;
- display: flex;
- flex-direction: column;
- .flex-left-header {
- display: flex;
- justify-content: space-around;
- }
- }
- }
- .table-title {
- height: 50px;
- line-height: 50px;
- background-color: #f3faff;
- font-size: 18px;
- font-weight: bold;
- }
- ::v-deep .el-dialog {
- margin-top: 0 !important;
- }
- ::v-deep .el-table__fixed-body-wrapper {
- top: 50px !important;
- }
- .flex-box {
- display: flex;
- width: calc(100% - 40px);
- border-radius: 20px;
- background-color: #fff;
- margin: 0 auto;
- margin-top: 20px;
- position: relative;
- flex-direction: column;
- .flex-load {
- display: flex;
- width: 100%;
- position: relative;
- margin: 1%;
- border-bottom: 1px solid #e1e1e1;
- justify-content: space-between;
- }
- .flex-header {
- display: flex;
- // width: 100%;
- position: relative;
- // height: 60px;
- margin: 1%;
- border-bottom: 1px solid #e1e1e1;
- justify-content: space-between;
- // ::v-deep .el-form-item {
- // width: 30%;
- // margin-right: 5%;
- // }
- .el-button {
- width: 150px;
- float: right;
- height: 40px !important;
- margin-right: 30px;
- }
- }
- }
- //设置子组件样式
- ::v-deep .el-tabs__item {
- padding: 0;
- margin-right: 20px;
- width: 166px;
- text-align: center;
- background-color: #d8eaf6;
- color: black;
- }
- ::v-deep .is-active {
- color: #fff;
- background-color: #0583cd;
- }
- ::v-deep .el-select {
- width: 100%
- }
- ::v-deep .el-tabs__active-bar {
- display: none;
- }
- ::v-deep .el-tabs__nav-wrap::after {
- display: none !important;
- }
- ::v-deep .el-form-item__label {
- text-align: center;
- }
- .flex-form {
- margin-top: 50px;
- }
- .flex-footer-botton {
- display: flex;
- justify-content: space-evenly;
- }
- </style>
|