|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124 |
- <template>
- <div class="app-container">
- <div style="margin-bottom:10px">
- <el-button type="success" @click="addBtn">新增</el-button>
- <el-button type="info" @click="goSearchLogs">日志</el-button>
- </div>
- <!--搜索-->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="任务名称">
- <el-input v-model.trim="searchParm.jobName" clearable placeholder="任务名称"></el-input>
- </el-form-item>
- <el-date-picker
- v-model.trim="searchTime"
- type="daterange"
- range-separator=":"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- style="width:270px"
- ></el-date-picker>
- <el-form-item label="状态">
- <el-select v-model.trim="searchParm.isPause" placeholder="请选择">
- <el-option
- v-for="item in isPauseList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearchByCondition">搜索</el-button>
- <el-button type="warning" @click="resetForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="list"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="任务ID" prop="jobId" />
- <el-table-column label="任务名称" prop="jobName" />
- <el-table-column label="SpringBean名称" prop="beanName" />
- <el-table-column label="方法名称" prop="methodName" />
- <el-table-column label="参数" prop="params">
- <template slot-scope="scope">
- <el-button type="text" @click="showParams(scope.row)">查看参数</el-button>
- </template>
- </el-table-column>
- <el-table-column label="cron表达式" prop="cronExpression" />
- <el-table-column label="运行状态" prop="isPause">
- <template slot-scope="scope">{{ scope.row.isPause | getStatus}}</template>
- </el-table-column>
- <el-table-column label="描述" prop="description" />
- <el-table-column label="创建时间" prop="createTime" />
- <el-table-column label="操作" width="310">
- <template slot-scope="scope">
- <!-- <el-button type="info" @click="modifyStatus(scope.row.jobId)">恢复</el-button> -->
- <el-button
- type="info"
- @click="modifyStatus(scope.row.jobId)"
- >{{scope.row.isPause ?'恢复':'暂停'}}</el-button>
- <el-button type="primary" @click="executionById(scope.row.jobId)">执行</el-button>
- <el-button type="warning" @click="editById(scope.row)">修改</el-button>
- <el-button type="danger" @click="delById(scope.row.jobId)">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- ></el-pagination>
- </div>
-
- <!--新增弹窗-->
- <el-dialog :visible.sync="dialogAddVisible" :title="dialogAddTitle" center width="45%">
- <div class="dialog-content">
- <el-form ref="addParm" size="small" :model="addParm" :rules="rules" label-width="130px">
- <el-form-item label="任务名称" prop="jobName">
- <el-input v-model.trim="addParm.jobName" clearable></el-input>
- </el-form-item>
- <el-form-item label="SpringBean名称" hidden prop="beanName">
- <el-input v-model.trim="editParm.beanName" clearable></el-input>
- </el-form-item>
- <el-form-item label="方法名称" hidden prop="methodName">
- <el-input v-model.trim="editParm.methodName" clearable></el-input>
- </el-form-item>
- <el-form-item label="描述" prop="description">
- <el-input v-model.trim="addParm.description" clearable></el-input>
- </el-form-item>
- <el-form-item label="cron表达式" prop="cronExpression">
- <el-input v-model.trim="addParm.cronExpression" clearable></el-input>
- </el-form-item>
- <el-form-item label="子任务ID" prop="subTask">
- <el-input v-model.trim="addParm.subTask" clearable></el-input>
- </el-form-item>
- <el-form-item label="负责人" prop="personInCharge">
- <el-input v-model.trim="addParm.personInCharge" clearable></el-input>
- </el-form-item>
- <el-form-item label="报警邮箱" prop="email">
- <el-input v-model.trim="addParm.email" clearable></el-input>
- </el-form-item>
- <el-form-item label="失败后暂停" prop="pauseAfterFailure">
- <el-select v-model.trim="addParm.pauseAfterFailure" placeholder="请选择">
- <el-option
- v-for="item in pauseAfterFailureList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>`
- </el-form-item>
- <el-form-item label="运行状态" prop="isPause">
- <el-select v-model.trim="addParm.isPause" placeholder="请选择">
- <el-option
- v-for="item in isPauseList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="设备名称" prop="rebotName">
- <el-input v-model.trim="addParm.rebotName" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchRebot"
- style="width:130px"
- >请选择设备</el-button>
- </el-form-item>
- <el-form-item label="应用名称" prop="applyId">
- <el-select v-model.trim="addParm.applyId" @change="applyClick" placeholder="请选择">
- <el-option
- v-for="item in applys"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- 先选择应用 后才能选择这个 根据应用调用不同的对应的 请求参数 分页查询 -->
- <el-form-item label="脚本参数" prop="paramsType">
- <el-radio-group v-model.trim="addParm.paramsType" @change="changeCheckRange">
- <el-radio :label="'1'">自定义输入</el-radio>
- <el-radio v-if="addParm.applyId==2" :label="'2'">速卖通-刷单</el-radio>
- <el-radio v-if="addParm.applyId==3" :label="'3'">速卖通-刷补</el-radio>
- <el-radio v-if="addParm.applyId==4" :label="'4'">速卖通-好评</el-radio>
- <el-radio v-if="addParm.applyId==5" :label="'5'">速卖通-收藏</el-radio>
- <el-radio v-if="addParm.applyId==6" :label="'6'">敦煌-加购</el-radio>
- <el-radio v-if="addParm.applyId==7" :label="'7'">敦煌-好评</el-radio>
- <el-radio v-if="addParm.applyId==8" :label="'8'">敦煌-抓单</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-form-item label="自定义参数" v-if="labelVal === '1'">
- <div id="app">
- <el-form class="base-form" ref="baseForm" :model="baseForm">
- <el-table
- ref="table-input"
- class="table"
- highlight-current-row
- :data="baseForm.demoList"
- @row-click="selectItem"
- >
- <el-table-column label="参数名称">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.name'" class="all">
- <el-input v-model.trim="scope.row.name" placeholder="请输入" :disabled="true"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="参数值">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.value'" class="all">
- <el-input v-model.trim="scope.row.value" placeholder="请输入"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="参数类型">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.type'" class="all">
- <el-input v-model.trim="scope.row.type" placeholder="请输入" :disabled="true"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <!-- <el-table-column prop label="操作">
- <template>
- <div class="flex-c-a">
- <el-button type="primary" @click="addLine()">增加</el-button>
- <el-button type="danger">删除</el-button>
- </div>
- </template>
- </el-table-column>-->
- </el-table>
- </el-form>
- </div>
- </el-form-item>
-
- <el-form-item label="速卖通-刷单" v-if="labelVal === '2'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchClickFarm"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- <el-form-item label="速卖通-刷补" v-if="labelVal === '3'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchClickFarmSupplyMent"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- <el-form-item label="速卖通-好评" v-if="labelVal === '4'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchWellReceived"
- style="width:130px"
- >选择订单信息</el-button>
- </el-form-item>
-
- <el-form-item label="速卖通-收藏" v-if="labelVal === '5'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchBrowse"
- style="width:130px"
- >选择收藏信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-加购" v-if="labelVal === '6'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchCarFarm"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-好评" v-if="labelVal === '7'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchWellReceived"
- style="width:130px"
- >选择订单信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-抓单" v-if="labelVal === '8'">
- <el-input v-model.trim="item" disabled="true" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchClickFarmOrder"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- </el-form>
- </div>
- <span slot="footer">
- <el-button type="info" @click="sureAddCancle('addParm')">取消</el-button>
- <el-button type="primary" @click="sureAdd('addParm')">确认</el-button>
- </span>
- </el-dialog>
-
- <!--修改弹窗-->
- <el-dialog :visible.sync="dialogEditVisible" :title="dialogEditTitle" center width="45%">
- <div class="dialog-content">
- <el-form ref="editParm" size="small" :model="editParm" :rules="rules" label-width="130px">
- <el-form-item label="任务名称" prop="jobName">
- <el-input v-model.trim="editParm.jobName" clearable></el-input>
- </el-form-item>
- <el-form-item label="描述" prop="description">
- <el-input v-model.trim="editParm.description" clearable></el-input>
- </el-form-item>
- <el-form-item label="SpringBean名称" hidden prop="beanName">
- <el-input v-model.trim="editParm.beanName" clearable></el-input>
- </el-form-item>
- <el-form-item label="方法名称" hidden prop="methodName">
- <el-input v-model.trim="editParm.methodName" hidden clearable></el-input>
- </el-form-item>
- <el-form-item label="cron表达式" prop="cronExpression">
- <el-input v-model.trim="editParm.cronExpression" clearable></el-input>
- </el-form-item>
- <el-form-item label="子任务ID" prop="subTask">
- <el-input v-model.trim="editParm.subTask" clearable></el-input>
- </el-form-item>
- <el-form-item label="负责人" prop="personInCharge">
- <el-input v-model.trim="editParm.personInCharge" clearable></el-input>
- </el-form-item>
- <el-form-item label="报警邮箱" prop="email">
- <el-input v-model.trim="editParm.email" clearable></el-input>
- </el-form-item>
- <el-form-item label="失败后暂停" prop="pauseAfterFailure">
- <el-select v-model.trim="editParm.pauseAfterFailure" placeholder="请选择">
- <el-option
- v-for="item in pauseAfterFailureList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>`
- </el-form-item>
- <el-form-item label="运行状态" prop="isPause">
- <el-select v-model.trim="editParm.isPause" placeholder="请选择">
- <el-option
- v-for="item in isPauseList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="设备名称" prop="rebotName">
- <el-input v-model.trim="editParm.rebotName" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchRebot"
- style="width:130px"
- >请选择设备</el-button>
- </el-form-item>
- <el-form-item label="应用名称" prop="applyId">
- <el-select v-model.trim="editParm.applyId" @change="applyClick" placeholder="请选择">
- <el-option
- v-for="item in applys"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item label="脚本参数" prop="paramsType">
- <el-radio-group v-model.trim="editParm.paramsType" @change="changeCheckRange">
- <el-radio :label="1">自定义输入</el-radio>
- <el-radio v-if="editParm.applyId==2" :label="2">速卖通-刷单</el-radio>
- <el-radio v-if="editParm.applyId==3" :label="3">速卖通-刷补</el-radio>
- <el-radio v-if="editParm.applyId==4" :label="4">速卖通-好评</el-radio>
- <el-radio v-if="editParm.applyId==5" :label="5">速卖通-收藏</el-radio>
- <el-radio v-if="editParm.applyId==6" :label="6">敦煌-加购</el-radio>
- <el-radio v-if="editParm.applyId==7" :label="7">敦煌-好评</el-radio>
- <el-radio v-if="editParm.applyId==8" :label="8">敦煌-抓单</el-radio>
- </el-radio-group>
- </el-form-item>
-
- <el-form-item label="刷单信息" v-if="editParm.paramsType == 1">
- <div id="app">
- <el-form class="base-form" ref="baseForm" :model="baseForm">
- <el-table
- ref="table-input"
- class="table"
- highlight-current-row
- :data="baseForm.demoList"
- @row-click="selectItem"
- >
- <el-table-column label="参数名称">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.name'" class="all">
- <el-input v-model.trim="scope.row.name" placeholder="请输入" :disabled="true"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="参数值">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.value'" class="all">
- <el-input v-model.trim="scope.row.value" placeholder="请输入"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="参数类型">
- <template slot-scope="scope">
- <el-form-item :prop="'demoList.'+scope.$index+'.type'" class="all">
- <el-input v-model.trim="scope.row.type" placeholder="请输入" :disabled="true"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <!-- <el-table-column prop label="操作">
- <template>
- <div class="flex-c-a">
- <el-button type="primary" @click="addLine()">增加</el-button>
- <el-button type="danger">删除</el-button>
- </div>
- </template>
- </el-table-column>-->
- </el-table>
- </el-form>
- </div>
- </el-form-item>
- <el-form-item label="刷单信息" v-if="editParm.paramsType == 2">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchClickFarm"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
- <el-form-item label="刷单补录信息" v-if="editParm.paramsType === 3">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchClickFarmSupplyMent"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- <el-form-item label="订单信息" v-if="editParm.paramsType === 4">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchWellReceived"
- style="width:130px"
- >选择订单信息</el-button>
- </el-form-item>
-
- <el-form-item label="收藏信息" v-if="editParm.paramsType === 5">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="goSearchBrowse"
- style="width:130px"
- >选择收藏信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-加购" v-if="editParm.paramsType === 6">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchCarFarm"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-好评" v-if="editParm.paramsType === 7">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchWellReceived"
- style="width:130px"
- >选择订单信息</el-button>
- </el-form-item>
-
- <el-form-item label="敦煌-抓单" v-if="editParm.paramsType === 8">
- <el-input v-model.trim="item" style="width:200px" />
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="dhGoSearchClickFarmOrder"
- style="width:130px"
- >选择刷单信息</el-button>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer">
- <el-button type="info" @click="sureEditCancle('editParm')">取消</el-button>
- <el-button type="primary" @click="sureEdit('editParm')">确认</el-button>
- </span>
- </el-dialog>
-
- <!--日志弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogLogsListVisible"
- :title="dialogLogsListTitle"
- center
- append-to-body
- >
- <!-- 搜索日志 -->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="任务名称">
- <el-input v-model.trim="searchLogsParm.jobName" clearable placeholder="任务名称"></el-input>
- </el-form-item>
- <el-date-picker
- v-model.trim="searchLogsTime"
- type="daterange"
- range-separator=":"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- style="width:270px"
- ></el-date-picker>
- <el-form-item label="状态">
- <el-input v-model.trim="searchLogsParm.isSuccess" clearable placeholder="状态"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearchLogsByCondition">搜索</el-button>
- <el-button type="warning" @click="resetLogsForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="logsList"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="任务名称" prop="jobName" />
- <el-table-column label="Bean名称" prop="beanName" />
- <el-table-column label="执行方法" prop="methodName" />
- <el-table-column label="参数">
- <template slot-scope="scope">
- <el-button type="text" @click="showParams(scope.row)">查看参数</el-button>
- </template>
- </el-table-column>
- <el-table-column label="cron表达式" prop="cronExpression" />
- <el-table-column label="异常详情" prop="exceptionDetail">
- <template slot-scope="scope">
- <el-button type="text" @click="showDetail(scope.row)">查看异常详情</el-button>
- </template>
- </el-table-column>
- <el-table-column label="耗时(毫秒)" prop="time" />
- <el-table-column label="状态" prop="isSuccess">
- <template slot-scope="scope">{{ scope.row.isSuccess | getLogIsSuccess}}</template>
- </el-table-column>
- <el-table-column label="创建日期" prop="createTime" />
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchLogsParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchLogsParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="logsTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
- <!--设备选择弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogRebotListVisible"
- :title="dialogRebotListTitle"
- center
- append-to-body
- >
- <!--搜索-->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="机器人账号">
- <el-input v-model.trim="searchRebotParm.accountName" clearable placeholder="机器人账号"></el-input>
- </el-form-item>
- <el-form-item label="uuid">
- <el-input v-model.trim="searchRebotParm.robotClientUuid" clearable placeholder="uuid"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearchRebot">搜索</el-button>
- <el-button type="warning" @click="resetRebotForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="rebotList"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="机器人账号" prop="accountName" />
- <el-table-column label="uuid信息" prop="robotClientUuid" />
- <el-table-column label="状态" prop="status">
- <template slot-scope="scope">{{ scope.row.status | getRebotStatus}}</template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" />
- <el-table-column label="修改时间" prop="updatedAt" />
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="pickRebot(scope.row)"
- v-if="rebotName !== scope.row.accountName"
- >选中</el-button>
- <div v-if="rebotName === scope.row.accountName">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchRebotParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchRebotParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="this.rebotTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
- <!--刷单信息弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogParamListVisible"
- :title="dialogParamListTitle"
- center
- append-to-body
- >
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="关键词">
- <el-input v-model.trim="searchParamParm.keyWord" clearable placeholder="关键词"></el-input>
- </el-form-item>
- <el-form-item label="Item">
- <el-input v-model.trim="searchParamParm.item" clearable></el-input>
- </el-form-item>
- <el-form-item label="店铺名称">
- <el-input v-model.trim="searchParamParm.shopName" clearable></el-input>
- </el-form-item>
- <el-form-item label="支付订单ID">
- <el-input v-model.trim="searchParamParm.payOrderId" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goClickFarmSearch">搜索</el-button>
- <el-button type="warning" @click="goClickFarmResetForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table
- ref="table"
- border
- size="small"
- :data="paramList"
- :header-cell-style="{textAlign:'center'}"
- :cell-style="{textAlign:'center'}"
- >
- <el-table-column label="国家" prop="country" align="center" />
- <el-table-column label="账号" prop="account" align="center" />
- <el-table-column label="平台" prop="platformName" align="center" />
- <el-table-column label="商品属性" prop="paramsType" align="center">
- <template slot-scope="scope">
- {{ scope.row.paramsType | getparamsType}}
- </template>
- </el-table-column>
- <el-table-column label="店铺名称" prop="shopName" align="center" />
- <el-table-column label="关键词" prop="keyWord" align="center" />
- <el-table-column label="数量" prop="number" align="center" />
- <el-table-column label="规格" prop="specification" align="center" />
- <el-table-column label="颜色" prop="color" align="center" />
- <el-table-column label="Item" prop="item" align="center" />
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">{{ scope.row.status | getFarmingStatus}}</template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" align="center" />
- <el-table-column label="修改时间" prop="updatedAt" align="center" />
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="pickParam(scope.row)"
- v-if="item !== scope.row.item"
- >选中</el-button>
- <div v-if="item === scope.row.item">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="clickHandleSizeChange"
- @current-change="clickHandleCurrentChange"
- :current-page="searchParamParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParamParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="paramTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
-
- <!--敦煌加购信息弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogParamDhListVisible"
- :title="dialogParamDhListTitle"
- center
- append-to-body
- >
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="商品参数">
- <el-select v-model.trim="searchParm.paramsType" placeholder="请选择">
- <el-option
- v-for="item in searchParamsTypeList"
- :key="item.name"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="国家">
- <el-input v-model.trim="searchParm.country" clearable></el-input>
- </el-form-item>
- <el-form-item label="账号">
- <el-input v-model.trim="searchParm.account" clearable></el-input>
- </el-form-item>
- <el-form-item label="状态">
- <el-select v-model.trim="searchParm.status" placeholder="请选择">
- <el-option
- v-for="item in statusDhList"
- :key="item.name"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearch">搜索</el-button>
- <el-button type="warning" @click="resetForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table ref="table" border size="small" :data="dhAddCarList" :header-cell-style="{textAlign:'center'}">
- <el-table-column label="商品属性" prop="paramsType" align="center">
- <template slot-scope="scope">
- {{ scope.row.paramsType | getparamsType}}
- </template>
- </el-table-column>
- <el-table-column label="国家" prop="country" align="center"/>
- <el-table-column label="账号" prop="account" align="center"/>
- <el-table-column label="公司名称" prop="companyName" align="center"/>
- <el-table-column label="加购商品" prop="carGoodIds" align="center"/>
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">
- {{ scope.row.status | getDhStatus}}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" align="center"/>
- <el-table-column label="修改时间" prop="updatedAt" align="center"/>
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="dhAddCarParam(scope.row)"
- v-if="item !== scope.row.item"
- >选中</el-button>
- <div v-if="item === scope.row.item">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="dhAddCarTotal">
- </el-pagination>
- </div>
- </el-dialog>
-
-
- <!--敦煌加购-好评信息弹窗-->
- <el-dialog
- width="75%"
- :visible.sync="dialogParamDhWellReceivedVisible"
- :title="dialogParamDhWellReceivedTitle"
- center
- append-to-body
- >
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="订单id">
- <el-input v-model.trim="searchParm.orderId" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="dhGoSearchWellReceived">搜索</el-button>
- <el-button type="warning" @click="resetDhWellReceivedForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table ref="table" border size="small" :data="dhAddCarList" :header-cell-style="{textAlign:'center'}">
- <el-table-column label="类型" prop="type" align="center">
- <template slot-scope="scope">
- {{ scope.row.type | getparamsOrderType}}
- </template>
- </el-table-column>
- <el-table-column label="总金额" prop="amount" align="center"/>
- <el-table-column label="店铺名称" prop="shop" align="center"/>
- <el-table-column label="订单id" prop="orderId" align="center"/>
- <el-table-column label="订单时间" prop="orderDate" align="center"/>
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">
- {{ scope.row.status | getOrderStatus}}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" align="center"/>
- <el-table-column label="修改时间" prop="updatedAt" align="center"/>
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="dhAddCarOrderParam(scope.row)"
- v-if="item !== scope.row.item"
- >选中</el-button>
- <div v-if="item === scope.row.item">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="dhAddCarTotal">
- </el-pagination>
- </div>
- </el-dialog>
-
-
- <!--订单信息弹窗-->
- <el-dialog width="75%" :visible.sync="dialogWellReceivedVisible" :title="dialogWellReceivedTitle" center append-to-body>
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="账号">
- <el-input v-model.trim="searchParm.account" clearable placeholder='账号'></el-input>
- </el-form-item>
- <el-form-item label="订单ID">
- <el-input v-model.trim="searchParm.orderId" clearable placeholder='orderId'></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearch">搜索</el-button>
- <el-button type="warning" @click="resetForm">重置</el-button>
- </el-form-item>
- </el-form>
-
- <!--表格渲染-->
- <el-table ref="table" border size="small" :data="wellReceivedList" :header-cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}">
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="平台名称" prop="platformName" />
- <el-table-column label="公司名称" prop="companyName" />
- <el-table-column label="总金额" prop="amount" />
- <el-table-column label="店铺名称" prop="shop" />
- <el-table-column label="店铺名称" prop="orderId" />
- <el-table-column label="评论" prop="comment"/>
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">
- {{ scope.row.status | getOrderStatus}}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" />
- <el-table-column label="修改时间" prop="updatedAt" />
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="wallReceived(scope.row)"
- v-if="item !== scope.row.id"
- >选中</el-button>
- <div v-if="item === scope.row.id">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="clickHandleSizeChange"
- @current-change="clickHandleCurrentChange"
- :current-page="searchParamParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParamParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="paramTotal"
- ></el-pagination>
- </div>
- </el-dialog>
-
-
- <!--浏览收藏信息弹窗-->
- <el-dialog width="75%" :visible.sync="dialogBrowseVisible" :title="dialogBrowseTitle" center append-to-body>
- <!--搜索-->
- <el-form class="mt_15" ref="form" inline size="small">
- <el-form-item label="账号">
- <el-input v-model.trim="searchParm.account" clearable placeholder='关键词'></el-input>
- </el-form-item>
- <el-form-item label="收藏链接">
- <el-input v-model.trim="searchParm.linkUrl" clearable></el-input>
- </el-form-item>
- <el-form-item label="状态">
- <el-select v-model.trim="searchParm.status" placeholder="请选择">
- <el-option
- v-for="item in statusBrowseList"
- :key="item.name"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="goSearch">搜索</el-button>
- <el-button type="warning" @click="resetForm">重置</el-button>
- </el-form-item>
- </el-form>
- <!--表格渲染-->
- <el-table ref="table" border size="small" :data="broseList" :header-cell-style="{textAlign:'center'}">
- <el-table-column label="序号" type="index" width="50" />
- <el-table-column label="买家ID" prop="buyerId" align="center"/>
- <el-table-column label="账号" prop="account" align="center"/>
- <el-table-column label="国家" prop="country" align="center"/>
- <el-table-column label="收藏链接" prop="linkUrl" align="center"/>
- <el-table-column label="状态描述" prop="paymentResults" align="center"/>
- <el-table-column label="状态" prop="status" align="center">
- <template slot-scope="scope">
- {{ scope.row.status | getStatus}}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="createdAt" align="center"/>
- <el-table-column label="修改时间" prop="updatedAt" align="center"/>
- <el-table-column label="操作" width="220">
- <template slot-scope="scope">
- <el-button
- type="success"
- @click="brose(scope.row)"
- v-if="item !== scope.row.id"
- >选中</el-button>
- <div v-if="item === scope.row.id">已选中</div>
- </template>
- </el-table-column>
- </el-table>
- <!--分页-->
- <div class="mt_15">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="searchParm.page"
- :page-sizes="[10, 20, 30, 40, 50]"
- :page-size="searchParm.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </div>
- </el-dialog>
-
- <!--参数详情-->
- <el-dialog
- :title="dialogParamTitle"
- :visible.sync="dialogParamVisible"
- width="30%"
- center
- style="overflow: hidden"
- >
- <div style="overflow-y: auto; height: 310px">
- <json-viewer :value="paramJsonData" :expand-depth="5" copyable boxed sort></json-viewer>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button type="primary" @click="dialogParamVisible = false">确定</el-button>
- </span>
- </el-dialog>
-
- <!--异常详情-->
- <el-dialog :title="dialogExceTitle" :visible.sync="dialogExceVisible" center width="30%">
- <div v-text="this.exceptionDetail" />
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getList,
- add,
- editById,
- delById,
- getById,
- modifyStatus,
- executionById,
- getLogsList,
- getWellReceivedList,
- getBrowseDataList,
- getDhCarList
- } from "@/api/group/quartzJob";
- import { getAll } from "@/api/group/apply";
- import { getFreeList } from "@/api/group/rebot";
- import { getClickFarmList } from "@/api/group/clickfarming";
- import { getCarOrderlist } from "@/api/group/dhAddCarOrder";
- import Vue from "vue";
- import JsonViewer from "vue-json-viewer";
- Vue.use(JsonViewer);
- export default {
- filters: {
- getStatus: function(value) {
- if (value == 1) {
- return "已暂停";
- } else if (value == 0) {
- return "运行中";
- }
- },
- getLogIsSuccess: function(value) {
- if (value == 1) {
- return "成功";
- } else if (value == 0) {
- return "失败";
- }
- },
- getRebotStatus: function(value) {
- if (value == 0) {
- return "未占用";
- } else if (value == 1) {
- return "已占用";
- }
- },
- getFarmingStatus: function(value) {
- if (value == 1) {
- return "待执行";
- } else if (value == 2) {
- return "执行中";
- } else if (value == 3) {
- return "执行成功";
- } else if (value == 4) {
- return "执行失败异常";
- } else if (value == 5) {
- return "待支付异常";
- } else if (value == 6) {
- return "支付成功异常";
- } else {
- return "执行失败";
- }
- },
- getparamsType: function (value) {
- if(value == 1) {
- return '关键词';
- } else if (value == 2) {
- return '链接';
- }
- },
- getparamsOrderType: function (value) {
- if(value == 1) {
- return '导入';
- } else if (value == 2) {
- return '刷单';
- }
- },
- getOrderStatus: function (value) {
- // 状态 1.待执行 2.执行中 3.执行成功 4.执行失败
- if(value == 1) {
- return '待执行';
- } else if (value == 2) {
- return '执行中';
- } else if (value == 3) {
- return '执行成功';
- } else if(value == 4) {
- return '执行失败';
- } else {
- return '执行失败';
- }
- },
- getDhStatus: function (value) {
- // 状态 1.待执行 2.执行中 3.加购成功 4.加购失败 5.下单成功 6.支付成功 7.抓单成功 8.抓单失败
- if(value == 1) {
- return '待执行';
- } else if (value == 2) {
- return '执行中';
- } else if (value == 3) {
- return '加购成功';
- } else if(value == 4) {
- return '加购失败';
- } else if(value == 5) {
- return '下单成功';
- } else if(value == 6) {
- return '待抓单';
- } else if(value == 7) {
- return '抓单中';
- } else if(value == 8) {
- return '抓单成功';
- } else if(value == 9) {
- return '抓单失败';
- } else {
- return '执行失败';
- }
- }
- },
- // 数据
- data() {
- return {
- searchParm: {
- page: 1,
- pageSize: 10,
- sort: "job_id",
- order: "desc",
- jobName: null,
- isPause: null,
- sTime: null,
- eTime: null,
- commentBoolean: false,
- inCatchorder:null
- },
- searchLogsParm: {
- page: 1,
- pageSize: 10,
- sort: "log_id",
- order: "desc",
- jobName: null,
- isSuccess: null,
- sTime: null,
- eTime: null
- },
- searchRebotParm: {
- page: 1,
- pageSize: 10,
- sort: "id",
- order: "desc",
- accountName: null,
- robotClientUuid: null
- },
- searchParamParm: {
- page: 1,
- pageSize: 10,
- sort: "created_at",
- order: "desc",
- keyWord: null,
- type: null,
- status: null,
- item: null,
- shopName: null,
- payOrderId: null,
- inStatusList:1,
- account:null,
- status:null,
- linkUrl:null,
- type:1,
- platformId:null,
- orderId:null
- },
- rebotName: "",
- logsTotal: 0,
- rebotTotal: 0,
- paramTotal: 0,
- total: 0,
- logsList: [],
- list: [],
- labelVal: "0",
- baseForm: {
- demoList: [
- {
- name: null,
- value: null,
- type: null
- }
- ]
- },
- newParams: {
- name: "",
- value: "",
- type: ""
- },
- item: "",
- index: 0,
- //新增、修改弹窗判断:1新增、2修改
- isEdit: 0,
- rebotList: [],
- paramList: [],
- dhAddCarList: [],
- dhAddCarTotal:0,
- wellReceivedList:[],
- broseList:[],
- applys: [],
- searchTime: "",
- searchLogsTime: "",
- paramJsonData: "",
- params: [],
- taskParam: {
- name: null,
- value: null,
- type: null
- },
- requestParams: {
- accountName: null,
- applyId: null,
- params: null
- },
- exceptionDetail: "",
- dialogAddVisible: false,
- dialogAddTitle: "新增窗口",
- dialogEditVisible: false,
- dialogEditTitle: "修改窗口",
- dialogImportVisible: false,
- dialogLogsListTitle: "操作日志",
- dialogLogsListVisible: false,
- dialogRebotListTitle: "设备列表",
- dialogRebotListVisible: false,
- dialogParamListTitle: "刷单信息列表",
- dialogParamListVisible: false,
- dialogParamDhListTitle: "敦煌加购列表",
- dialogParamDhListVisible: false,
- dialogParamDhWellReceivedTitle: "敦煌好评列表",
- dialogParamDhWellReceivedVisible: false,
- dialogWellReceivedTitle: "订单信息列表",
- dialogWellReceivedVisible: false,
- dialogBrowseTitle: "浏览收藏列表",
- dialogBrowseVisible: false,
- dialogParamVisible: false,
- dialogParamTitle: "参数详情",
- dialogExceVisible: false,
- dialogExceTitle: "异常详情",
- dialogParamInputVisible: false,
- dialogParamInputTitle: "参数输入窗口",
- pauseAfterFailureList: [
- {
- value: 1,
- label: "是"
- },
- {
- value: 0,
- label: "否"
- }
- ],
- isPauseList: [
- {
- value: 1,
- label: "已暂停"
- },
- {
- value: 0,
- label: "运行中"
- }
- ],
- logIsSuccess: [
- {
- value: 0,
- label: "失败"
- },
- {
- value: 1,
- label: "成功"
- }
- ],
- statusBrowseList: [
- {
- value: 1,
- label: "待执行"
- },
- {
- value: 2,
- label: "执行中"
- },
- {
- value: 3,
- label: "执行成功"
- },
- {
- value: 4,
- label: "执行失败"
- }
- ],
- statusDhList:[
- {
- id: null,
- name: '全部'
- },
- {
- id: 1,
- name: '待执行'
- },
- {
- id: 2,
- name: '执行中',
- },
- {
- id: 3,
- name: '加购成功'
- },
- {
- id: 4,
- name: '加购失败'
- },{
- id:5,
- name:"下单成功"
- },{
- id:6,
- name:"支付成功"
- },{
- id:7,
- name:"抓单成功"
- },{
- id:8,
- name:"支付抓单失败成功"
- }],
- searchParamsTypeList:[
- {
- id: null,
- name: '全部'
- },
- {
- id: 1,
- name: '关键词'
- },
- {
- id: 2,
- name: '链接',
- },
- ],
- addListDemo: [],
- addParm: {
- jobId: null,
- jobName: null,
- description: null,
- beanName: null,
- methodName: null,
- cronExpression: null,
- subTask: null,
- personInCharge: null,
- email: null,
- pauseAfterFailure: null,
- isPause: null,
- rebotName: null,
- applyId: null,
- params: null,
- paramsType: null,
- paramId: null,
- item: null
- },
- editParm: {
- jobId: null,
- jobName: null,
- description: null,
- beanName: null,
- methodName: null,
- cronExpression: null,
- subTask: null,
- personInCharge: null,
- email: null,
- pauseAfterFailure: null,
- isPause: null,
- params: null,
- paramsType: null,
- item: null,
- applyId: null,
- rebotName: null
- },
- testTest: null,
- testTestStr: "",
- rules: {
- jobName: [
- { required: true, message: "请输入任务名称", trigger: "blur" }
- ],
- description: [
- { required: true, message: "请输入任务描述", trigger: "blur" }
- ],
- // beanName: [
- // { required: true, message: '请输入SpringBean名称', trigger: 'blur' }
- // ],
- // methodName: [
- // { required: true, message: '请输入方法名称', trigger: 'blur' }
- // ],
- cronExpression: [
- { required: true, message: "请输入cron表达式", trigger: "blur" }
- ],
- personInCharge: [
- { required: true, message: "请输入负责人", trigger: "blur" }
- ],
- pauseAfterFailure: [
- { required: true, message: "请选择失败后是否暂停", trigger: "blur" }
- ],
- isPause: [
- { required: true, message: "请选择运行状态", trigger: "blur" }
- ],
- rebotName: [{ required: true, message: "请选择设备", trigger: "blur" }],
- applyId: [{ required: true, message: "请选择应用", trigger: "blur" }],
- params: [{ required: true, message: "请输入脚本参数", trigger: "blur" }]
- },
- paramsRules: {
- name: [
- {
- required: true,
- message: "请输入参数名称",
- trigger: "blur"
- }
- ],
- value: [
- {
- required: true,
- message: "请输入参数值",
- trigger: "blur"
- }
- ],
- type: [
- {
- required: true,
- message: "请输入参数类型",
- trigger: "blur"
- }
- ]
- }
- };
- },
- // 调用
- created() {
- this.goSearch();
- },
- //方法
- methods: {
- changeCheckRange(val) {
- this.labelVal = val;
- this.editParm.paramsType = val;
- },
- goInputParam() {
- if (
- this.baseForm.demoList[0].name == "" ||
- this.baseForm.demoList[0].type == "" ||
- this.baseForm.demoList[0].value == ""
- ) {
- console.log(this.baseForm.demoList);
- this.$message.error("参数不能为空");
- } else {
- console.log(this.baseForm.demoList);
- this.requestParams.params = this.baseForm.demoList;
- this.dialogParamInputVisible = false;
- this.$message.success("参数输入成功");
- }
- },
- showDetail(data) {
- if (data.exceptionDetail == null || data.exceptionDetail == "") {
- this.$alert("无异常", "异常详情", {
- confirmButtonText: "确定",
- closeOnClickModal: true,
- closeOnPressEscape: true
- });
- } else {
- this.dialogExceVisible = true;
- this.exceptionDetail = data.exceptionDetail;
- }
- },
- showParams(data) {
- console.log(data);
- if (data.params == null || data.params == "") {
- this.$alert("无参数", "参数详情", {
- confirmButtonText: "确定",
- closeOnClickModal: true,
- closeOnPressEscape: true
- });
- } else {
- this.paramJsonData = JSON.parse(data.params);
- this.dialogParamVisible = true;
- }
- },
- applyClick(value) {
- this.requestParams.applyId = value;
- console.log(this.requestParams);
- },
- //重置
- resetForm() {
- this.searchParm.jobName = null;
- this.searchParm.isPause = null;
- this.searchParm.sTime = null;
- this.searchParm.eTime = null;
- this.searchTime = null;
- this.goSearch();
- },
- resetLogsForm() {
- this.searchLogsParm.jobName = null;
- this.searchLogsParm.isSuccess = null;
- this.searchLogsParm.sTime = null;
- this.searchLogsParm.eTime = null;
- this.searchLogsTime = null;
- this.goSearchLogs();
- },
- resetRebotForm() {
- this.searchRebotParm.accountName = null;
- this.searchRebotParm.robotClientUuid = null;
- this.goSearchRebot();
- },
- resetParams() {
- this.requestParams.params = null;
- this.baseForm.demoList = [
- {
- name: "",
- value: "",
- type: ""
- }
- ];
- this.$message.warning("重置成功");
- },
- // 查询
- goSearchByCondition() {
- this.searchParm.sTime = this.searchTime[0];
- this.searchParm.eTime = this.searchTime[1];
- console.log(this.searchParm);
- this.goSearch();
- },
- goSearch() {
- this.searchParm.page = 1;
- this.getAllApply();
- this.getDataList();
- },
- goClickFarmSearch() {
- this.searchParamParm.page = 1;
- this.getClickFarmDataList();
- },
- //重置
- goClickFarmResetForm() {
- this.searchParamParm.keyWord = null;
- this.searchParamParm.item = null;
- this.searchParamParm.shopName = null;
- this.searchParamParm.payOrderId = null;
- this.searchParamParm.status = null;
-
- this.goClickFarmSearch();
- },
- // 分页获取表格数据-刷单信息
- getClickFarmDataList(){
- getClickFarmList(this.searchParamParm).then(res => {
- if(res.code==200) {
- this.paramList = res.data.list;
- this.paramTotal = res.data.total;
- console.log("paramTotal:" + paramTotal);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- // 分页敦煌加购
- getDhAddCarDataList() {
- getDhCarList(this.searchParamParm).then(res => {
- if(res.code==200) {
- this.dhAddCarList = res.data.list;
- this.dhAddCarTotal = res.data.total;
- console.log("paramTotal:" + paramTotal);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- // 分页敦煌好评
- carOrderlist(){
- getCarOrderlist(this.searchParamParm).then(res => {
- if(res.code==200) {
- this.dhAddCarList = res.data.list;
- this.dhAddCarTotal = res.data.total;
- console.log("paramTotal:" + paramTotal);
- }
- }).catch(err => {
- console.log(err)
- })
- },
-
- // 分页获取表格数据-订单信息
- getWellReceivedDataList(){
- getWellReceivedList(this.searchParamParm).then(res => {
- if(res.code==200) {
- this.wellReceivedList = res.data.list;
- this.paramTotal = res.data.total;
- console.log("paramTotal:" + paramTotal);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- // 分页获取收藏-列表信息
- getBrowseDataSearchList() {
- getBrowseDataList(this.searchParamParm).then(res => {
- if(res.code==200) {
- this.broseList = res.data.list;
- this.paramTotal = res.data.total;
- console.log("paramTotal:" + paramTotal);
- }
- }).catch(err => {
- console.log(err)
- })
- },
- goSearchLogsByCondition() {
- this.searchLogsParm.sTime = this.searchLogsTime[0];
- this.searchLogsParm.eTime = this.searchLogsTime[1];
- this.goSearchLogs();
- },
- goSearchLogs() {
- this.dialogLogsListVisible = true;
- this.searchLogsParm.page = 1;
- this.getLogsDataList();
- },
- goSearchRebot() {
- this.dialogRebotListVisible = true;
- this.searchRebotParm.page = 1;
- this.getRebotDataList();
- },
- // 速卖通-刷单
- goSearchClickFarm() {
- this.dialogParamListVisible = true;
- this.searchParamParm.page = 1;
- this.searchParamParm.inStatusList=1;
- this.searchParamParm.status = null;
- this.searchParamParm.type = 1;
- this.searchParamParm.platformId = 2;
- this.getClickFarmDataList();
- },
- // 速卖通-刷单补录
- goSearchClickFarmSupplyMent() {
- this.dialogParamListVisible = true;
- this.searchParamParm.page = 1;
- this.searchParamParm.inStatusList=null;
- this.searchParamParm.status = 5;
- this.searchParamParm.type = 1;
- this.searchParamParm.platformId = 2;
- this.getClickFarmDataList();
- },
- // 速卖通-好评
- goSearchWellReceived() {
- this.dialogWellReceivedVisible = true;
- this.searchParamParm.page = 1;
- this.searchParamParm.status = 1;
- this.searchParamParm.type = 1;
- this.searchParamParm.commentBoolean = true;
- this.searchParamParm.platformId = 2;
- this.getWellReceivedDataList();
- },
- // 速卖通-浏览收藏
- goSearchBrowse(){
- this.dialogBrowseVisible = true;
- this.searchParamParm.page = 1;
- this.searchParamParm.inStatusList = 1;
- this.searchParamParm.platformId = 2;
- this.getBrowseDataSearchList();
- },
- // 敦煌-加购
- dhGoSearchCarFarm() {
- this.dialogParamDhListVisible = true;
- this.dialogParamDhListTitle = "敦煌加购";
- this.searchParamParm.page = 1;
- this.searchParamParm.inStatusList=1;
- this.getDhAddCarDataList();
- },
- // 敦煌-好评
- dhGoSearchWellReceived() {
- this.dialogParamDhWellReceivedVisible = true;
- this.searchParamParm.page = 1;
- this.searchParamParm.type = 2;
- this.searchParamParm.inStatusList=1;
- this.searchParamParm.orderId = this.searchParm.orderId;
- this.carOrderlist();
- },
- // 敦煌-抓单
- dhGoSearchClickFarmOrder() {
- this.dialogParamDhListVisible = true;
- this.dialogParamDhListTitle = "敦煌抓单";
- this.searchParamParm.page = 1;
- this.searchParamParm.inStatusList=2;
- this.getDhAddCarDataList();
- },
- // 分页获取表格数据
- getDataList() {
- getList(this.searchParm)
- .then(res => {
- if (res.code == 200) {
- this.list = res.data.list;
- this.total = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- getLogsDataList() {
- getLogsList(this.searchLogsParm)
- .then(res => {
- console.log(res);
- if (res.code == 200) {
- this.logsList = res.data.list;
- this.logsTotal = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- getRebotDataList() {
- getFreeList(this.searchRebotParm)
- .then(res => {
- console.log(res);
- if (res.code == 200) {
- this.rebotList = res.data.list;
- this.rebotTotal = res.data.total;
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- getAllApply() {
- getAll().then(res => {
- if (res.code == 200) {
- this.applys = res.data;
- }
- });
- },
- // 新增
- addBtn() {
- this.buyerId = null;
- this.addParm = {
- id: null,
- jobId: null,
- jobName: null,
- description: null,
- beanName: null,
- methodName: null,
- cronExpression: null,
- subTask: null,
- personInCharge: null,
- email: null,
- pauseAfterFailure: null,
- isPause: null,
- params: null,
- paramsType: null,
- applyId: null,
- rebotName: null
- };
-
- this.baseForm.demoList = [
- {
- name: "id",
- value: "",
- type: "str"
- },
- {
- name: "country",
- value: "",
- type: "str"
- },
- {
- name: "account",
- value: "",
- type: "str"
- },
- {
- name: "pwd",
- value: "",
- type: "str"
- },
- {
- name: "keyWord",
- value: "",
- type: "str"
- },
- {
- name: "number",
- value: "",
- type: "str"
- },
- {
- name: "specification",
- value: "",
- type: "str"
- },
- {
- name: "color",
- value: "",
- type: "str"
- },
- {
- name: "item",
- value: "",
- type: "str"
- },
- {
- name: "vpnShare",
- value: "",
- type: "str"
- }
- ];
- this.item = "";
- this.rebotName = "";
- this.labelVal = "0";
- this.requestParams.applyId = "";
- this.requestParams.accountName = "";
- this.requestParams.params = "";
- this.addParm.params = JSON.stringify(this.requestParams);
- this.isEdit = 1;
- this.dialogAddVisible = true;
- this.$refs.addParm.clearValidate();
- },
- sureAdd(addParm) {
-
- this.$refs[addParm].validate((valid) => {
- if (valid) {
- this.$refs.addParm.clearValidate();
- if (this.requestParams.accountName == "undefined" || this.requestParams.accountName == null || this.requestParams.accountName == "" || this.requestParams.accountName == "null" ){
- this.requestParams.accountName = this.rebotName;
- }
- this.requestParams.applyId = this.addParm.applyId;
- if (this.labelVal == 1) {
- this.requestParams.params = this.baseForm.demoList;
- }
- this.addParm.params = JSON.stringify(this.requestParams);
- console.log(this.addParm);
- add(this.addParm)
- .then(res => {
- if (res.code == 200) {
- this.dialogAddVisible = false;
- this.$message.success("新增成功!");
- this.getDataList();
- } else if (res.code == -1) {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- sureAddCancle(addParm) {
- this.dialogAddVisible=flase;
- this.$refs.addParm.clearValidate();
- },
- // 根据id删除
- delById(id) {
- this.$confirm("确认删除?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- delById({ id })
- .then(res => {
- if (res.code == 200) {
- this.$message.success("删除成功!");
- this.getDataList();
- }
- })
- .catch(err => {
- console.log(err);
- });
- })
- .catch(() => {
- this.$message.info("取消删除");
- });
- },
- executionById(id) {
- executionById({ id })
- .then(res => {
- if (res.code == 200) {
- this.$message.success("执行成功");
- this.getDataList;
- } else {
- this.$message.error("执行失败");
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- // 修改
- editById(data) {
- getById({ id: data.jobId })
- .then(res => {
- if (res.code == 200) {
- this.editParm.jobId = res.data.jobId;
- this.editParm.jobName = res.data.jobName;
- this.editParm.description = res.data.description;
- this.editParm.beanName = res.data.beanName;
- this.editParm.methodName = res.data.methodName;
- this.editParm.cronExpression = res.data.cronExpression;
- this.editParm.subTask = res.data.subTask;
- this.editParm.personInCharge = res.data.personInCharge;
- this.editParm.email = res.data.email;
- this.editParm.pauseAfterFailure = res.data.pauseAfterFailure;
- this.editParm.isPause = res.data.isPause;
- this.editParm.params = res.data.params;
- this.labelVal = res.data.paramsType;
- this.editParm.paramsType = res.data.paramsType;
- this.requestParams = JSON.parse(this.editParm.params);
- this.editParm.rebotName = this.requestParams.accountName;
- this.editParm.applyId = this.requestParams.applyId;
- if (res.data.paramsType == 1) {
- this.item = null;
- this.baseForm.demoList = this.requestParams.params;
- } else if (res.data.paramsType == 2) {
- if (this.requestParams.params[8].value != null) {
- this.item = this.requestParams.params[8].value;
- }
-
- this.baseForm.demoList = [
- {
- name: "id",
- value: "",
- type: "str"
- },
- {
- name: "country",
- value: "",
- type: "str"
- },
- {
- name: "account",
- value: "",
- type: "str"
- },
- {
- name: "pwd",
- value: "",
- type: "str"
- },
- {
- name: "keyWord",
- value: "",
- type: "str"
- },
- {
- name: "number",
- value: "",
- type: "str"
- },
- {
- name: "specification",
- value: "",
- type: "str"
- },
- {
- name: "color",
- value: "",
- type: "str"
- },
- {
- name: "item",
- value: "",
- type: "str"
- },
- {
- name: "vpnShare",
- value: "",
- type: "str"
- }
- ];
- }
-
- this.isEdit = 2;
- this.dialogEditVisible = true;
- // this.$refs.editParm.clearValidate();
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- // 确认修改
- sureEdit(editParm) {
- this.$refs[editParm].validate((valid) => {
- if (valid) {
- this.$refs.editParm.clearValidate();
- this.requestParams.accountName = this.editParm.rebotName;
- this.requestParams.applyId = this.editParm.applyId;
- if (this.labelVal == 1) {
- this.requestParams.params = this.baseForm.demoList;
- }
- this.editParm.params = JSON.stringify(this.requestParams);
- editById(this.editParm)
- .then(res => {
- if (res.code == 200) {
- this.dialogEditVisible = false;
- this.$message.success("修改成功!");
- this.getDataList();
- } else if (res.code == -1) {
- this.$message.warning(res.message);
- }
- })
- .catch(err => {
- console.log(err);
- });
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- sureEditCancle(editParm) {
- this.dialogEditVisible=flase;
- this.$refs.editParm.clearValidate();
- },
- modifyStatus(id) {
- modifyStatus({ id })
- .then(res => {
- if (res.code == 200) {
- this.$message.success("更改成功!");
- this.getDataList();
- }
- })
- .catch(err => {
- console.log(err);
- });
- },
- pickRebot(data) {
- if(this.dialogAddVisible == true) {
- this.addParm.rebotName = data.accountName;
- }
-
- if (this.dialogEditVisible == true) {
- this.editParm.rebotName = data.accountName;
- }
-
- this.requestParams.accountName = data.accountName;
- this.dialogRebotListVisible = false;
- this.$message.success("选择成功");
- },
- pickParam(data) {
- this.requestParams.params = data.id;
- this.item = data.id;
- this.dialogParamListVisible = false;
- this.$message.success("选择成功");
- },
- dhAddCarParam(data) {
- this.requestParams.params = data.id;
- this.item = data.id;
- this.dialogParamDhListVisible = false;
- this.$message.success("选择成功");
- },
- // 敦煌好评
- dhAddCarOrderParam(data) {
- this.requestParams.params = data.id;
- this.item = data.id;
- this.dialogParamDhWellReceivedVisible = false;
- this.$message.success("选择成功");
- },
- wallReceived(data) {
- console.log(this.requestParams);
- this.requestParams.params = data.id;
- this.item = data.id;
- this.dialogWellReceivedVisible = false;
- this.$message.success("选择成功");
- },
- brose(data) {
- console.log(this.requestParams);
- this.requestParams.params = data.id;
- this.item = data.id;
- this.dialogBrowseVisible = false;
- this.$message.success("选择成功");
- },
- // 分页
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- this.searchParm.pageSize = val;
- this.getDataList();
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- this.searchParm.page = val;
- this.getDataList();
- },
- clickHandleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- this.searchParamParm.pageSize = val;
- this.getDataList();
- },
- clickHandleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- this.searchParamParm.page = val;
- this.getDataList();
- },
- // 选中某一行修改或移除
- selectItem(row, column, event) {
- this.selectedFundRow = row;
- if (event.target.innerText == "删除") {
- this.removeFundBtn(this.selectedFundRow);
- }
- },
- // 删除指定行
- removeFundBtn(params) {
- this.baseForm.demoList = this.baseForm.demoList.filter(ele => {
- var flag = false;
- // 如果不一致,则保留该行
- for (const key in params) {
- if (ele[key] != params[key]) {
- flag = true;
- break;
- }
- }
- return flag;
- });
- // 如果全部删除后没有可以点击的一行了,需要加一行空行
- if (!this.baseForm.demoList.length) {
- this.addLine();
- }
- },
- // 增加一个空行, 用于录入或显示第一行
- addLine() {
- const newParams = {
- name: "",
- value: "",
- type: ""
- };
- this.index++;
- this.baseForm.demoList.push(newParams);
- }
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- </style>
|