1、定时任务页面增加字段
2、全局项目有关名称改为中国航发成发以及调整logo
| | |
| | | <meta charset="utf-8"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| | | <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| | | <title>JeecgBoot ä¼ä¸çº§ä½ä»£ç å¹³å°</title> |
| | | <title>ä¸å½èªåæå</title> |
| | | <link rel="icon" href="<%= BASE_URL %>logo.png"> |
| | | <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script> |
| | | <style> |
| | |
| | | <div id="loader"></div> |
| | | <div class="loader-section section-left"></div> |
| | | <div class="loader-section section-right"></div> |
| | | <div class="load_title">æ£å¨å è½½ JeecgBoot ä½ä»£ç å¹³å°,请èå¿çå¾
|
| | | <div class="load_title">æ£å¨å è½½ä¸å½èªåæå管çç³»ç»,请èå¿çå¾
|
| | | |
| | | </div> |
| | | </div> |
| | |
| | | * @param title è¦ä¿®æ¹çæ°æ é¢ |
| | | */ |
| | | changeTitle(title) { |
| | | let projectTitle = "Jeecg-Boot ä¼ä¸çº§ä½ä»£ç å¹³å°" |
| | | let projectTitle = "ä¸å½èªåæå" |
| | | // é¦é¡µç¹æ®å¤ç |
| | | if (this.$route.path === indexKey) { |
| | | document.title = projectTitle |
| | |
| | | :type="collapsed ? 'menu-unfold' : 'menu-fold'" |
| | | @click="toggle"/> |
| | | |
| | | <span v-if="device === 'desktop'">欢è¿è¿å
¥ Jeecg-Boot ä¼ä¸çº§ä½ä»£ç å¹³å°</span> |
| | | <span v-else>Jeecg-Boot</span> |
| | | <span v-if="device === 'desktop'">欢è¿è¿å
¥ ä¸å½èªåæå</span> |
| | | <span v-else>ä¸å½èªåæå</span> |
| | | |
| | | <user-menu :theme="theme"/> |
| | | </div> |
| | |
| | | <div class="header-index-wide"> |
| | | <div class="header-index-left" :style="topMenuStyle.headerIndexLeft"> |
| | | <logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader"/> |
| | | <div class="top-nav-text"> |
| | | <div style="width:100%;height: 50%;line-height:35px">å¯çº§ï¼å
é¨</div> |
| | | <div style="width:100%;height: 50%;line-height:25px">è¦åï¼æ¬ç³»ç»ç¦æ¢åå¨ãå¤çãä¼ è¾æ¶å¯ä¿¡æ¯</div> |
| | | </div> |
| | | <div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle"> |
| | | <s-menu |
| | | mode="horizontal" |
| | |
| | | } |
| | | |
| | | /* update_end author:scott date:20190220 for: 缩å°é¦é¡µå¸å±é¡¶é¨çé«åº¦*/ |
| | | .top-nav-text { |
| | | color: #f00; |
| | | height: 100% |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |
| | | .top-nav-text { |
| | | min-width: 400px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1680px) and (max-width: 1920px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1400px) and (max-width: 1680px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1280px) and (max-width: 1400px) { |
| | | .top-nav-text { |
| | | min-width: 450px; |
| | | } |
| | | } |
| | | |
| | | @media screen and (max-width: 1280px) { |
| | | .top-nav-text { |
| | | min-width: 300px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <router-link :to="routerLinkTo"> |
| | | |
| | | <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logoé¢è²æ ¹æ®ä¸»é¢é¢è²åå --> |
| | | <img v-if="navTheme === 'dark'" src="~@/assets/logo-white.png" alt="logo"> |
| | | <img v-else src="~@/assets/logo.svg" alt="logo"> |
| | | <!--<img v-if="navTheme === 'dark'" src="~@/assets/logo_white.png" alt="logo">--> |
| | | <img src="~@/assets/logo.png" alt="logo"> |
| | | <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logoé¢è²æ ¹æ®ä¸»é¢é¢è²åå --> |
| | | |
| | | <h1 v-if="showTitle">{{ title }}</h1> |
| | |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: 'Jeecg-Boot Pro', |
| | | default: 'ä¸å½èªåæå', |
| | | required: false |
| | | }, |
| | | showTitle: { |
| | |
| | | <!-- update-end author:sunjianlei date:20200219 for: èåæç´¢æ¹ä¸ºå¨æç»ä»¶ï¼å¨ææºç«¯åç°åºå¼¹åºæ¡ --> |
| | | <!-- update-end author:sunjianlei date:20191220 for: è§£å³å
¨å±æ ·å¼å²çªçé®é¢ --> |
| | | <!-- update_end author:zhaoxin date:20191129 for: å头é¨èåæ å¯¼èª --> |
| | | <span class="action"> |
| | | <a class="logout_title" target="_blank" href="http://doc.jeecg.com"> |
| | | <a-icon type="question-circle-o"></a-icon> |
| | | </a> |
| | | </span> |
| | | <!--<span class="action">--> |
| | | <!--<a class="logout_title" target="_blank" href="http://doc.jeecg.com">--> |
| | | <!--<a-icon type="question-circle-o"></a-icon>--> |
| | | <!--</a>--> |
| | | <!--</span>--> |
| | | <header-notice class="action"/> |
| | | <a-dropdown> |
| | | <span class="action action-full ant-dropdown-link user-dropdown-menu"> |
| | |
| | | <span v-if="isDesktop()">æ¬¢è¿æ¨ï¼{{ nickname() }}</span> |
| | | </span> |
| | | <a-menu slot="overlay" class="user-dropdown-menu-wrapper"> |
| | | <a-menu-item key="0"> |
| | | <router-link :to="{ name: 'account-center' }"> |
| | | <a-icon type="user"/> |
| | | <span>个人ä¸å¿</span> |
| | | </router-link> |
| | | </a-menu-item> |
| | | <a-menu-item key="1"> |
| | | <router-link :to="{ name: 'account-settings-base' }"> |
| | | <a-icon type="setting"/> |
| | | <span>è´¦æ·è®¾ç½®</span> |
| | | </router-link> |
| | | </a-menu-item> |
| | | <a-menu-item key="3" @click="systemSetting"> |
| | | <a-icon type="tool"/> |
| | | <span>ç³»ç»è®¾ç½®</span> |
| | | </a-menu-item> |
| | | <!--<a-menu-item key="0">--> |
| | | <!--<router-link :to="{ name: 'account-center' }">--> |
| | | <!--<a-icon type="user"/>--> |
| | | <!--<span>个人ä¸å¿</span>--> |
| | | <!--</router-link>--> |
| | | <!--</a-menu-item>--> |
| | | <!--<a-menu-item key="1">--> |
| | | <!--<router-link :to="{ name: 'account-settings-base' }">--> |
| | | <!--<a-icon type="setting"/>--> |
| | | <!--<span>è´¦æ·è®¾ç½®</span>--> |
| | | <!--</router-link>--> |
| | | <!--</a-menu-item>--> |
| | | <!--<a-menu-item key="3" @click="systemSetting">--> |
| | | <!--<a-icon type="tool"/>--> |
| | | <!--<span>ç³»ç»è®¾ç½®</span>--> |
| | | <!--</a-menu-item>--> |
| | | <a-menu-item key="4" @click="updatePassword"> |
| | | <a-icon type="setting"/> |
| | | <span>å¯ç ä¿®æ¹</span> |
| | | </a-menu-item> |
| | | <a-menu-item key="5" @click="updateCurrentDepart"> |
| | | <a-icon type="cluster"/> |
| | | <span>忢é¨é¨</span> |
| | | </a-menu-item> |
| | | <!--<a-menu-item key="5" @click="updateCurrentDepart">--> |
| | | <!--<a-icon type="cluster"/>--> |
| | | <!--<span>忢é¨é¨</span>--> |
| | | <!--</a-menu-item>--> |
| | | <a-menu-item key="6" @click="clearCache"> |
| | | <a-icon type="sync"/> |
| | | <span>æ¸
çç¼å</span> |
| | |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="ä»»å¡ç±»å" prop="jobClassName"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡ç±»å" v-model="queryParam.jobClassName"></a-input> |
| | | <a-form-model-item label="ä»»å¡åç§°" prop="jobClassName"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡åç§°" v-model="queryParam.jobName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="ä»»å¡ç¶æ" prop="status"> |
| | | <a-select style="width: 220px" v-model="queryParam.status" placeholder="è¯·éæ©ç¶æ"> |
| | | <a-select style="width: 100%" v-model="queryParam.status" placeholder="è¯·éæ©ç¶æ"> |
| | | <a-select-option value="">å
¨é¨</a-select-option> |
| | | <a-select-option value="0">æ£å¸¸</a-select-option> |
| | | <a-select-option value="-1">忢</a-select-option> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :scroll="{x:true}" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | |
| | | |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">å¯å¨</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">忢</a> |
| | | <a @click="executeImmediately(record)">ç«å³æ§è¡</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a @click="handlequartzLog(record)">æ¥å¿</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item><a @click="executeImmediately(record)">æ§è¡ä¸æ¬¡</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">å¯å¨</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">忢</a> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item><a @click="handleEdit(record)">ç¼è¾</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | |
| | | |
| | | <!-- 表ååºå --> |
| | | <quartzJob-modal ref="modalForm" @ok="modalFormOk"></quartzJob-modal> |
| | | |
| | | <!--æ¥å¿--> |
| | | <quartz-job-list-modal ref="modalFormList" @ok="modalFormOk"></quartz-job-list-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import QuartzJobModal from './modules/QuartzJobModal' |
| | | import QuartzJobListModal from './modules/QuartzJobListModal' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis"; |
| | |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | QuartzJobModal, |
| | | QuartzJobListModal, |
| | | JEllipsis |
| | | }, |
| | | data () { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: 'ä»»å¡ç±»å', |
| | | title: 'ä»»å¡åç§°', |
| | | align:"center", |
| | | dataIndex: 'jobClassName', |
| | | dataIndex: 'jobName', |
| | | sorter: true, |
| | | /* customRender:function (text) { |
| | | return "*"+text.substring(9,text.length); |
| | | }*/ |
| | | /* customRender:function (text) { |
| | | return "*"+text.substring(9,text.length); |
| | | }*/ |
| | | }, |
| | | { |
| | | title: 'cron表达å¼', |
| | |
| | | scopedSlots: {customRender: 'parameterRender'}, |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | title: '说æ', |
| | | align:"center", |
| | | width: 250, |
| | | dataIndex: 'description', |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | url: { |
| | | list: "/sys/quartzJob/list", |
| | | delete: "/sys/quartzJob/delete", |
| | | deleteBatch: "/sys/quartzJob/deleteBatch", |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | handlequartzLog: function (record) { |
| | | this.$refs.modalFormList.openPage(record); |
| | | this.$refs.modalFormList.title = "æ§è¡æ¥å¿"; |
| | | this.$refs.modalFormList.disableSubmit = false; |
| | | }, |
| | | //çééè¦éåhandleTableChange |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | //è¿ç§çéæ¹å¼åªæ¯æåé |
| | | |
| | | |
| | | // update-begin-author:liusq date:20210624 for:åå°å®æ¶ä»»å¡æ æ³ç¿»é¡µ #2666 |
| | | if(filters && Object.keys(filters).length>0 && filters.status){ |
| | | this.filters.status = filters.status[0]; |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.pause,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.resume,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.execute,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-row :gutter="10"> |
| | | <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px"> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- æç´¢åºå --> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="8" :sm="8"> |
| | | <a-form-item label="车é´åç§°" :labelCol="{ span: 5 }" :wrapperCol="{ span: 19}"> |
| | | <a-input placeholder="" v-model="queryParam.workshopName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" style="margin: 5px 0 10px 2px"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å»ºè½¦é´</a-button> |
| | | </div> |
| | | |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"> </i> 已鿩 |
| | | <a |
| | | ><b>{{ selectedRowKeys1.length }}</b></a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected1">æ¸
空</a> |
| | | </div> |
| | | |
| | | <div style="margin-top: 15px"> |
| | | <a-table |
| | | style="height: 500px" |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type: 'radio' }" |
| | | @change="handleTableChange" |
| | | > |
| | | <template slot="backgroundImage" slot-scope="text, record"> |
| | | <img :src="getImgView(record.backgroundImage)" width="50" height="50" /> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleOpen(record)">设å¤</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> æ´å¤ <a-icon type="down" /> </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete1(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </a-col> |
| | | <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1"> |
| | | <a-card :bordered="false"> |
| | | <div @click="hideUserList" class="close-circle"> |
| | | <a-icon type="close-circle"/> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="12" :sm="12"> |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> |
| | | <a-col :md="9" :sm="24"> |
| | | <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-col> |
| | | </span> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" :md="24" :sm="24"> |
| | | <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin: 5px 0 10px 2px" |
| | | >å·²æè®¾å¤ |
| | | </a-button> |
| | | |
| | | <a-dropdown v-if="selectedRowKeys2.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel2"> |
| | | <a-icon type="delete" /> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 |
| | | <a style="font-weight: 600">{{ selectedRowKeys2.length }}</a |
| | | >项 |
| | | <a style="margin-left: 24px" @click="onClearSelected2">æ¸
空</a> |
| | | </div> |
| | | <a-table |
| | | style="height: 500px" |
| | | ref="table2" |
| | | bordered |
| | | size="middle" |
| | | rowKey="equipmentId" |
| | | :columns="columns2" |
| | | :dataSource="dataSource2" |
| | | :pagination="ipagination2" |
| | | :loading="loading2" |
| | | :rowSelection="{ selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 }" |
| | | @change="handleTableChange2" |
| | | > |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete2(record.equipmentId)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </a-col> |
| | | <!-- 表ååºå --> |
| | | <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal> |
| | | <!--æ°å¢è½¦é´--> |
| | | <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'æ·»å å·²æè®¾å¤'"></select-device-drawer> |
| | | <!--å·²æè®¾å¤--> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { deleteAction, postAction, getAction } from '@/api/manage' |
| | | import SelectDeviceDrawer from './modules/SelectDeviceDrawer' |
| | | import WorkshopModal from './modules/WorkshopModal' |
| | | import { filterObj } from '@/utils/util' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'WorkshopSignageManagement', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SelectDeviceDrawer, |
| | | WorkshopModal, |
| | | moment, |
| | | }, |
| | | data() { |
| | | return { |
| | | model1: {}, |
| | | model2: {}, |
| | | currentRoleId: '', |
| | | currentWorkshopId: '', |
| | | queryParam1: {}, |
| | | queryParam2: {}, |
| | | dataSource1: [], |
| | | dataSource2: [], |
| | | ipagination1: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | ipagination2: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter1: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | isorter2: { |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | filters1: {}, |
| | | filters2: {}, |
| | | loading1: false, |
| | | loading2: false, |
| | | selectedRowKeys1: [], |
| | | selectedRowKeys2: [], |
| | | selectionRows1: [], |
| | | selectionRows2: [], |
| | | test: {}, |
| | | rightcolval: 0, |
| | | columns: [ |
| | | { |
| | | title: '车é´åç§°', |
| | | align: 'center', |
| | | dataIndex: 'workshopName', |
| | | }, |
| | | { |
| | | title: '车é´èæ¯å¾', |
| | | dataIndex: 'backgroundImage', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'backgroundImage' }, |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·é¢è²', |
| | | dataIndex: 'equipmentIdColor', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | columns2: [ |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: 'center', |
| | | width: 80, |
| | | dataIndex: 'equipmentType', |
| | | }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: 'center', |
| | | width: 120, |
| | | }, |
| | | ], |
| | | // é«çº§æ¥è¯¢åæ° |
| | | superQueryParams2: '', |
| | | // é«çº§æ¥è¯¢æ¼æ¥æ¡ä»¶ |
| | | superQueryMatchType2: 'and', |
| | | url: { |
| | | list: '/mdc/mdcWorkshopInfo/list', |
| | | delete: '/mdc/mdcWorkshopInfo/delete', |
| | | list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList', |
| | | addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment', |
| | | delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', |
| | | deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | leftColMd() { |
| | | return this.selectedRowKeys1.length === 0 ? 24 : 12 |
| | | }, |
| | | rightColMd() { |
| | | return this.selectedRowKeys1.length === 0 ? 0 : 12 |
| | | }, |
| | | }, |
| | | methods: { |
| | | onSelectChange2(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys2 = selectedRowKeys |
| | | this.selectionRows2 = selectionRows |
| | | }, |
| | | onClearSelected2() { |
| | | this.selectedRowKeys2 = [] |
| | | this.selectionRows2 = [] |
| | | }, |
| | | onClearSelected1() { |
| | | this.selectedRowKeys1 = [] |
| | | this.selectionRows1 = [] |
| | | }, |
| | | onSelectChange1(selectedRowKeys, selectionRows) { |
| | | this.rightcolval = 1 |
| | | this.selectedRowKeys1 = selectedRowKeys |
| | | this.selectionRows1 = selectionRows |
| | | this.model1 = Object.assign({}, selectionRows[0]) |
| | | this.currentWorkshopId = selectedRowKeys[0] |
| | | this.loadData2() |
| | | }, |
| | | getQueryParams2() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams2) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams2) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType2 |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2) |
| | | param.field = this.getQueryField2() |
| | | param.pageNo = this.ipagination2.current |
| | | param.pageSize = this.ipagination2.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | getQueryField2() { |
| | | //TODO åæ®µæéæ§å¶ |
| | | var str = 'id,' |
| | | this.columns2.forEach(function (value) { |
| | | str += ',' + value.dataIndex |
| | | }) |
| | | return str |
| | | }, |
| | | modalFormOk2() { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData2() |
| | | }, |
| | | loadData2(arg) { |
| | | if (!this.url.list2) { |
| | | this.$message.error('请设置url.list2屿§!') |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination2.current = 1 |
| | | } |
| | | if (this.currentWorkshopId === '') return |
| | | let params = this.getQueryParams2() //æ¥è¯¢æ¡ä»¶ |
| | | params.workshopId = this.currentWorkshopId |
| | | this.loading2 = true |
| | | getAction(this.url.list2, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource2 = res.result.records |
| | | this.ipagination2.total = res.result.total |
| | | }else{ |
| | | this.dataSource2=[] |
| | | } |
| | | this.loading2 = false |
| | | }) |
| | | }, |
| | | handleDelete1: function (id) { |
| | | this.handleDelete(id) |
| | | this.dataSource2 = [] |
| | | this.currentRoleId = '' |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è®¾å¤è¡¨æ ¼ä¸çå 餿é®å触åå é¤å个车é´ä¸è®¾å¤çå
³ç³» |
| | | * @param equipmentId å½åè¡ç设å¤ç¼å· |
| | | */ |
| | | handleDelete2: function (equipmentId) { |
| | | if (!this.url.delete2) { |
| | | this.$notification.error({ |
| | | message:'æ¶æ¯', |
| | | description:'请设置url.delete2屿§!' |
| | | }); |
| | | return |
| | | } |
| | | var that = this |
| | | deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData2() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * æ¹éå é¤è½¦é´ä¸è®¾å¤çå
³ç³» |
| | | */ |
| | | batchDel2: function () { |
| | | if (!this.url.deleteBatch2) { |
| | | this.$message.error('请设置url.deleteBatch2屿§!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys2.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ä¸æ¡è®°å½', |
| | | }) |
| | | return |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys2.length; a++) { |
| | | ids += this.selectedRowKeys2[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'æ¯å¦å é¤é䏿°æ®?', |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch2, { |
| | | workshopId: that.currentWorkshopId, |
| | | equipmentIds: ids, |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData2() |
| | | that.onClearSelected2() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å |
| | | * @param data 已鿩çè®¾å¤ |
| | | */ |
| | | selectOK(data) { |
| | | let params = {} |
| | | params.workshopId = this.currentWorkshopId |
| | | params.equipmentIdList = [] |
| | | for (var a = 0; a < data.length; a++) { |
| | | params.equipmentIdList.push(data[a]) |
| | | } |
| | | console.log(params) |
| | | postAction(this.url.addDeviceInWorkshop, params).then((res) => { |
| | | if (res.success) { |
| | | this.loadData2() |
| | | this.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } else { |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»å·²æè®¾å¤æé®è§¦å |
| | | */ |
| | | handleAddDeviceInWorkshop() { |
| | | if (this.currentWorkshopId == '') { |
| | | this.$message.error('è¯·éæ©ä¸ä¸ªè½¦é´!') |
| | | } else { |
| | | this.$refs.selectDeviceDrawer.visible = true |
| | | this.$refs.selectDeviceDrawer.selectedRowKeys = [] |
| | | this.$refs.selectDeviceDrawer.selectedRows = [] |
| | | this.$refs.selectDeviceDrawer.checkedKeys = [] |
| | | this.$refs.selectDeviceDrawer.expandAll() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»å½åè¡è½¦é´é项å触åäºä»¶ |
| | | * @param record å½åè¡æ°æ® |
| | | */ |
| | | handleOpen(record) { |
| | | this.rightcolval = 1 |
| | | this.selectedRowKeys1 = [record.id] |
| | | this.model1 = Object.assign({}, record) |
| | | this.currentWorkshopId = record.id |
| | | this.onClearSelected2() |
| | | this.loadData2() |
| | | }, |
| | | |
| | | searchQuery2() { |
| | | this.loadData2(1) |
| | | }, |
| | | searchReset2() { |
| | | this.queryParam2 = {} |
| | | this.loadData2(1) |
| | | }, |
| | | handleTableChange2(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter2.column = sorter.field |
| | | this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination2 = pagination |
| | | this.loadData2() |
| | | }, |
| | | hideUserList() { |
| | | //this.rightcolval = 0 |
| | | this.selectedRowKeys1 = [] |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 8px; |
| | | } |
| | | .close-circle{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | right: 15px; |
| | | top: 15px; |
| | | cursor: pointer; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <pre> |
| | | {{textContent}} |
| | | </pre> |
| | | |
| | | </div> |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | |
| | | export default { |
| | | name: 'QuartzJobDetails', |
| | | // mixins: [JeecgListMixin], |
| | | components: { |
| | | |
| | | }, |
| | | props: { |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | visible:false, |
| | | textContent:'', |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | showDetails(record){ |
| | | // console.log(record) |
| | | this.visible = true |
| | | this.textContent = record.exceptionDetail |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | handleOk() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="ä»»å¡åç§°"> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡åç§°" v-model="queryParam.jobName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="æ¶é´"> |
| | | <a-range-picker show-time @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="4" :sm="4"> |
| | | <a-space> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æ§è¡æ¥å¿å¯¼åº')">导åº</a-button> |
| | | </a-space> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | |
| | | <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button>--> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table ref="table" size="middle" bordered rowKey="index" :scroll="{Â y: 400Â }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | @change="handleTableChange"> |
| | | <!-- ç¶ææ¸²ææ¨¡æ¿ --> |
| | | <template slot="customRenderStatus" slot-scope="isSuccess"> |
| | | <a-tag v-if="isSuccess==0" color="green">æå</a-tag> |
| | | <a-tag v-if="isSuccess==-1" color="red">失败</a-tag> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | |
| | | <a v-if="record.isSuccess == -1" @click="executeImmediately(record)">æ¥ç详æ
</a> |
| | | |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | <quartz-job-details ref="modalForm"></quartz-job-details> |
| | | |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util'; |
| | | import { |
| | | ajaxGetSelectItems |
| | | } from '@/api/api' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import { |
| | | deleteAction, |
| | | requestPut, |
| | | getAction, |
| | | downFile, |
| | | postAction |
| | | } from '@/api/manage' |
| | | import { |
| | | JeecgListMixin |
| | | } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import JDate from '@/components/jeecg/JDate' |
| | | import moment from 'moment' |
| | | import QuartzJobDetails from './QuartzJobDetails' |
| | | export default { |
| | | name: 'QuartzJobListModal', |
| | | // mixins: [JeecgListMixin], |
| | | components: { |
| | | JDictSelectTag, |
| | | JEllipsis, |
| | | JInput, |
| | | Tooltip, |
| | | JDate, |
| | | QuartzJobDetails |
| | | }, |
| | | props: { |
| | | status: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | visible:false, |
| | | /* æ¥è¯¢æ¡ä»¶-请ä¸è¦å¨queryParamä¸å£°æéå符串å¼ç屿§ */ |
| | | queryParam: {}, |
| | | /* æ°æ®æº */ |
| | | dataSource:[], |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* æåºåæ° */ |
| | | isorter:{ |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | /* çéåæ° */ |
| | | filters: {}, |
| | | /* tableå è½½ç¶æ */ |
| | | loading:false, |
| | | /* tableéä¸keys*/ |
| | | selectedRowKeys: [], |
| | | /* tableéä¸records*/ |
| | | selectionRows: [], |
| | | /* æ¥è¯¢æå */ |
| | | toggleSearchStatus:false, |
| | | /* é«çº§æ¥è¯¢æ¡ä»¶çæç¶æ */ |
| | | superQueryFlag:false, |
| | | /* é«çº§æ¥è¯¢æ¡ä»¶ */ |
| | | superQueryParams: '', |
| | | /** é«çº§æ¥è¯¢æ¼æ¥æ¹å¼ */ |
| | | superQueryMatchType: 'and', |
| | | |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | // { |
| | | // title: 'ä»»å¡åç§°', |
| | | // align: 'center', |
| | | // dataIndex: 'jobClassName', |
| | | // }, |
| | | // { |
| | | // title: 'cron表达å¼', |
| | | // align: 'center', |
| | | // dataIndex: 'cronExpression', |
| | | // }, |
| | | { |
| | | title: 'ä»»å¡åç§°', |
| | | align: 'center', |
| | | dataIndex: 'jobName' |
| | | }, |
| | | { |
| | | title: 'åæ°', |
| | | align: 'center', |
| | | dataIndex: 'parameter' |
| | | }, |
| | | |
| | | { |
| | | title: 'æ¥éä¿¡æ¯', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | { |
| | | title: 'æåæ å¿', |
| | | align: 'center', |
| | | dataIndex: 'isSuccess', |
| | | scopedSlots: { customRender: 'customRenderStatus' }, |
| | | filterMultiple: false, |
| | | filters: [ |
| | | { text: 'æå', value: '0' }, |
| | | { text: '失败', value: '-1' }, |
| | | ] |
| | | }, |
| | | { |
| | | title: 'æ§è¡æ¶é´ï¼æ¯«ç§ï¼', |
| | | align: 'center', |
| | | dataIndex: 'executionTime', |
| | | customRender:(t,r,index) =>{ |
| | | var milliseconds = parseInt(t) |
| | | let hours = Math.floor(milliseconds / 3600000); |
| | | milliseconds = milliseconds % 3600000; |
| | | let minutes = Math.floor(milliseconds / 60000); |
| | | milliseconds = milliseconds % 60000; |
| | | let seconds = Math.floor(milliseconds / 1000); |
| | | milliseconds = milliseconds % 1000; |
| | | if(hours == 0){ |
| | | if(minutes == 0){ |
| | | if(seconds == 0) { |
| | | return `${milliseconds}毫ç§` |
| | | }else{ |
| | | return `${seconds}ç§ ${milliseconds}毫ç§` |
| | | } |
| | | }else{ |
| | | return `${minutes}åé ${seconds}ç§ ${milliseconds}毫ç§`; |
| | | } |
| | | }else{ |
| | | return `${hours}å°æ¶ ${minutes}åé ${seconds}ç§ ${milliseconds}毫ç§`; |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | { |
| | | title: '任塿§è¡æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | }, |
| | | ], |
| | | sectionPData: [], |
| | | sectionData: [], |
| | | url: { |
| | | list: '/sys/quartzLog/list', |
| | | exportXlsUrl:'/sys/quartzLog/exportXls' |
| | | }, |
| | | value:undefined, |
| | | valueProduct:undefined, |
| | | dates: [], |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | let id = this.queryParam.jobId |
| | | this.queryParam = {} |
| | | this.dates = [] |
| | | this.queryParam.jobId = id |
| | | this.loadData(1); |
| | | }, |
| | | executeImmediately:function (record) { |
| | | this.$refs.modalForm.showDetails(record); |
| | | this.$refs.modalForm.title = "æ¥éä¿¡æ¯"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | }, |
| | | handleExportXls(fileName){ |
| | | if(!fileName || typeof fileName != "string"){ |
| | | fileName = "å¯¼åºæä»¶" |
| | | } |
| | | let param = this.getQueryParams(); |
| | | if(this.selectedRowKeys && this.selectedRowKeys.length>0){ |
| | | param['selections'] = this.selectedRowKeys.join(",") |
| | | } |
| | | console.log("导åºåæ°",param) |
| | | downFile(this.url.exportXlsUrl,param).then((data)=>{ |
| | | if (!data) { |
| | | this.$message.warning("æä»¶ä¸è½½å¤±è´¥") |
| | | return |
| | | } |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls') |
| | | }else{ |
| | | let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'})) |
| | | let link = document.createElement('a') |
| | | link.style.display = 'none' |
| | | link.href = url |
| | | link.setAttribute('download', fileName+'.xls') |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link); //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url); //éæ¾æblob对象 |
| | | } |
| | | }) |
| | | }, |
| | | disabledDate(current) { |
| | | return current && current > moment().subtract('days', 1); |
| | | }, |
| | | dateParamChange(v1, v2) { |
| | | this.queryParam.startTime = v2[0] |
| | | this.queryParam.endTime = v2[1] |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | // this.onClearSelected() |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | openPage(record) { |
| | | // console.log(record) |
| | | this.visible = true |
| | | this.dataSource = []; |
| | | this.queryParam = { |
| | | jobId: record.id |
| | | }; |
| | | |
| | | this.loadData(); |
| | | }, |
| | | getQueryParams() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if(this.superQueryParams){ |
| | | sqp['superQueryParams']=encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); |
| | | param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | param.jobId = this.queryParam.jobId; |
| | | param.startTime = this.queryParam.startTime; |
| | | param.endTime = this.queryParam.endTime; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | | // if (this.getCustomQueryParams) { |
| | | // param = this.getCustomQueryParams(param); |
| | | // if(!param){ |
| | | // return false; |
| | | // } |
| | | // } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | getQueryField() { |
| | | //TODO åæ®µæéæ§å¶ |
| | | var str = "id,"; |
| | | this.columns.forEach(function (value) { |
| | | str += "," + value.dataIndex; |
| | | }); |
| | | return str; |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | if(!params){ |
| | | return false; |
| | | } |
| | | |
| | | this.loading = true; |
| | | // params.id = this.queryParam.id |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | }else{ |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | modalFormOk(val) { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData(); |
| | | |
| | | this.selectedRowKeys = [val.id]; |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(); |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | handleOk() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä»»å¡ç±»å" prop="jobClassName" hasFeedback > |
| | | <a-input placeholder="请è¾å
¥ä»»å¡ç±»å" v-model="model.jobClassName" /> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä»»å¡åç§°" prop="jobName" hasFeedback> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡åç§°" v-model="model.jobName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä»»å¡ç±»å" prop="jobClassName" hasFeedback> |
| | | <a-input placeholder="请è¾å
¥ä»»å¡ç±»å" v-model="model.jobClassName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="Cron表达å¼" prop="cronExpression"> |
| | | <!-- <j-cron v-model="model.cronExpression"/>--> |
| | | <j-easy-cron v-model="model.cronExpression" /> |
| | | <j-easy-cron v-model="model.cronExpression"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="åæ°" prop="parameter" > |
| | | <a-textarea placeholder="请è¾å
¥åæ°" :rows="5" v-model="model.parameter" /> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="åæ°" prop="parameter"> |
| | | <a-textarea placeholder="请è¾å
¥åæ°" :rows="5" v-model="model.parameter"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æè¿°" prop="description"> |
| | | <a-textarea placeholder="请è¾å
¥æè¿°" :rows="3" v-model="model.description" /> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æè¿°" prop="description"> |
| | | <a-textarea placeholder="请è¾å
¥æè¿°" :rows="3" v-model="model.description"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ç¶æ" prop="status"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ç¶æ" prop="status"> |
| | | <j-dict-select-tag type="radioButton" v-model="model.status" dictCode="quartz_status"/> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | // import JCron from "@/components/jeecg/JCron"; |
| | | import cronValidator from "@/components/jeecg/JEasyCron/validator"; |
| | | import cronValidator from '@/components/jeecg/JEasyCron/validator' |
| | | |
| | | export default { |
| | | name: "QuartzJobModal", |
| | | name: 'QuartzJobModal', |
| | | components: { |
| | | // JCron, |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | title:"æä½", |
| | | title: 'æä½', |
| | | buttonStyle: 'solid', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | cron: { |
| | | label: '', |
| | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | cronExpression: [ |
| | | {required: true, message: '请è¾å
¥cron表达å¼!'}, |
| | | {validator: cronValidator,} |
| | | { required: true, message: '请è¾å
¥cron表达å¼!' }, |
| | | { validator: cronValidator } |
| | | ], |
| | | jobClassName: [{required: true, message: '请è¾å
¥ä»»å¡ç±»å!'}] |
| | | jobName: [{ required: true, message: '请è¾å
¥ä»»å¡åç§°!' }], |
| | | jobClassName: [{ required: true, message: '请è¾å
¥ä»»å¡ç±»å!' }] |
| | | }, |
| | | url: { |
| | | add: "/sys/quartzJob/add", |
| | | edit: "/sys/quartzJob/edit", |
| | | }, |
| | | add: '/sys/quartzJob/add', |
| | | edit: '/sys/quartzJob/edit' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | // ç»ä¸è®¾ç½®é»è®¤å¼ |
| | | this.edit({ |
| | | cronExpression: '* * * * * ? *', |
| | | status: 0, |
| | | status: 0 |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible = true; |
| | | edit(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate((ok, err) => { |
| | | if (ok) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | |
| | | console.log('æäº¤åæ°',this.model) |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.close(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | console.log('æäº¤åæ°', this.model) |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.confirmLoading = false |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | data() { |
| | | return { |
| | | searchInput: '', |
| | | searchValue: '', |
| | | cardLoading: false, |
| | | loading: false, |
| | | treeDataSource: [], |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | wrapClassName="ant-modal-cust-warp" |
| | | style="top:5%;height: 85%;overflow-y: hidden"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item label="车é´åç§°" required prop="workshopName"> |
| | | <a-input v-model="model.workshopName" placeholder="请è¾å
¥è½¦é´åç§°"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="车é´èæ¯å¾" required prop="backgroundImage"> |
| | | <j-image-upload class="avatar-uploader" text="ä¸ä¼ " v-model="model.backgroundImage"></j-image-upload> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="设å¤ç¼å·é¢è²"> |
| | | <a-input type="color" v-model="model.equipmentIdColor"></a-input> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="æææ è¯"> |
| | | <a-input placeholder="请è¾å
¥æææ è¯" v-model="model.perms"/> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import api from '@/api/mdc' |
| | | |
| | | export default { |
| | | name: 'WorkshopModal', |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | isEdit: false, |
| | | model: {}, |
| | | layout: { |
| | | labelCol: { span: 3 }, |
| | | wrapperCol: { span: 14 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | workshopName: [ |
| | | { required: true, message: '请è¾å
¥è½¦é´åç§°!' }, |
| | | { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' } |
| | | ], |
| | | id: [ |
| | | { required: true, message: '请è¾å
¥è½¦é´ç¼å·!' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateRoleCode } |
| | | ], |
| | | backgroundImage: [ |
| | | { required: true, message: '请ä¸ä¼ 车é´èæ¯å¾!' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit(this.modelDefault) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | //ç¼è¾é¡µé¢ç¦æ¢ä¿®æ¹è§è²ç¼ç |
| | | if (this.model.id) { |
| | | this.isEdit = true |
| | | } else { |
| | | this.isEdit = false |
| | | } |
| | | }, |
| | | close() { |
| | | this.$refs.form.clearValidate() |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | console.log('触å') |
| | | that.confirmLoading = true |
| | | let obj |
| | | if (!this.isEdit) { |
| | | console.log('è§¦åæ°å¢') |
| | | obj = api.addWorkshopApi(this.model) |
| | | } else { |
| | | console.log('触åä¿®æ¹') |
| | | obj = api.editWorkshopApi(this.model) |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | validateRoleCode(rule, value, callback) { |
| | | if (/[\u4E00-\u9FA5]/g.test(value)) { |
| | | callback('车é´ç¼å·ä¸å¯è¾å
¥æ±å!') |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .avatar-uploader > .ant-upload { |
| | | width: 104px; |
| | | height: 104px; |
| | | } |
| | | </style> |
| | |
| | | <div class="top"> |
| | | <div class="header"> |
| | | <a href="/"> |
| | | <img src="~@/assets/lxzn.png" class="logo" alt="logo"> |
| | | <span class="title">MDCæºæ
§è½¦é´</span> |
| | | <img src="~@/assets/logo.png" class="logo" alt="logo"> |
| | | <span class="title">ä¸å½èªåæå</span> |
| | | </a> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | devServer: { |
| | | port: 3000, |
| | | open:true, |
| | | // hot: true, |
| | | // disableHostCheck: true, |
| | | // overlay: { |