¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢å·¥æ¶æ±æ» |
| | | export function selectAuxiliaryAllByMonth(data) { |
| | | return request({ |
| | | url: "/auxiliaryOriginalHours/selectAuxiliaryAllByMonth", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢è¾
å©å·¥æ¶ |
| | | export function selectAuxiliaryWorkingHoursDay(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursDay", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢äº§éå·¥æ¶ |
| | | export function selectAuxiliaryOutputWorkingHours(data) { |
| | | return request({ |
| | | url: "/auxiliaryOutputWorkingHours/selectAuxiliaryOutputWorkingHours", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // å é¤è¾
å©å·¥æ¶ |
| | | export function deleteAuxiliaryWorkingHoursDay(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/deleteAuxiliaryWorkingHoursDay", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢è¾
å©å·¥æ¶ |
| | | export function insertAuxiliaryWorkingHoursDay(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/insertAuxiliaryWorkingHoursDay", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹è¾
å©å·¥æ¶ |
| | | export function updateAuxiliaryWorkingHoursDay(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/updateAuxiliaryWorkingHoursDay", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è¾
å©å·¥æ¶--æ¹å |
| | | export function approve(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/approve", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç»è®¡äº§éå·¥æ¶æ±æ»åè¾
å©å·¥æ¶æ±æ» |
| | | export function collectWorkingHours(data) { |
| | | return request({ |
| | | url: "/auxiliaryOutputWorkingHours/collectWorkingHours", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ ¹æ®ç¼å·å½åç¨æ·ä¿¡æ¯æ¥è¯¢æå¨ç次 |
| | | export function selectshiftByUser(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/selectshiftByUser", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ ¹æ®ç¼å·æ¥è¯¢è¾
å©å·¥æ¶é
ç½®ä¿¡æ¯ |
| | | export function selectAuxiliaryWorkingHoursByNumber(number) { |
| | | return request({ |
| | | url: |
| | | "/auxiliaryWorkingHoursDay/selectAuxiliaryWorkingHoursByNumber?number=" + |
| | | number, |
| | | method: "post", |
| | | }); |
| | | } |
| | | |
| | | // è¾
å©å·¥æ¶å¯¼åº |
| | | export function exportAssistantHours(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHoursDay/exportAssistantHours", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 产éå·¥æ¶å¯¼åº |
| | | export function exportOutputHours(data) { |
| | | return request({ |
| | | url: "/auxiliaryOutputWorkingHours/exportOutputHours", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢è¾
å©å·¥æ¶ |
| | | export function selectAuxiliaryWorkingHours(data) { |
| | | return request({ |
| | | url: "/auxiliaryWorkingHours/selectAuxiliaryWorkingHours", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // è·åå®éªå®¤åç§° |
| | | export function obtainItemParameterList(query) { |
| | | return request({ |
| | | url: "/laboratoryScope/obtainItemParameterList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢å®¢æ·å表 |
| | | export function selectStandardTemplatePageList(query) { |
| | | export function selectStandardTemplatePageList(data) { |
| | | return request({ |
| | | url: "/StandardTemplate/selectStandardTemplatePageList", |
| | | method: "get", |
| | | params: query, |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | |
| | | methods: { |
| | | templateWrite() { |
| | | var option = {}; |
| | | console.log(2222, this.data); |
| | | if (this.data != null && this.data != "") { |
| | | option = JSON.parse(this.data); |
| | | console.log(11111, option); |
| | | } else { |
| | | let rowlen = {}; |
| | | let columnlen = {}; |
| | |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | stripe |
| | | style="width: 100%; " |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | stripe |
| | | style="width: 100%" |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <template v-if="isSelection"> |
| | | <el-table-column type="selection" width="55" /> |
| | | </template> |
| | | <template> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | </template> |
| | | |
| | | <template v-for="(item, index) in column"> |
| | | <el-table-column |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | | :filtered-value="item.filteredValue" |
| | | :filters="item.filters" |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :prop="item.prop" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | :sortable="item.sortable ? true : false" |
| | | :type="item.type" |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <template v-if="isSelection"> |
| | | <el-table-column type="selection" width="55" /> |
| | | </template> |
| | | <template> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | </template> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template |
| | | v-if="item.hasOwnProperty('colunmTemplate')" |
| | | :slot="item.colunmTemplate" |
| | | slot-scope="scope" |
| | | > |
| | | <slot |
| | | v-if="item.theadSlot" |
| | | :index="index" |
| | | :name="item.theadSlot" |
| | | :row="scope.row" |
| | | /> |
| | | </template> |
| | | |
| | | <template v-for="(item, index) in column"> |
| | | <el-table-column :column-key="item.columnKey" :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" |
| | | :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | :sortable="item.sortable ? true : false" :type="item.type" :width="item.width" |
| | | align="center"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" |
| | | slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot |
| | | v-if="item.slot" |
| | | :index="scope.$index" |
| | | :name="item.slot" |
| | | :row="scope.row" |
| | | /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | | <el-progress :percentage="Number(scope.row[item.prop])" /> |
| | | </div> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | </div> |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | | <el-progress :percentage="Number(scope.row[item.prop])" /> |
| | | </div> |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag |
| | | v-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'string' |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | | scope.row[item.prop], |
| | | item.formatData |
| | | )" |
| | | v-else-if=" |
| | | typeof dataTypeFn(scope.row[item.prop], item.formatData) == |
| | | 'object' |
| | | " |
| | | :key="index" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)" |
| | | >{{ |
| | | item.tagGroup |
| | | ? tag[item.tagGroup.label] |
| | | ? tag[item.tagGroup.label] |
| | | : tag |
| | | : tag |
| | | }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | > |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag v-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) == 'string'" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn(scope.row[item.prop], item.formatData)" |
| | | v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) == 'object'" |
| | | :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ item.tagGroup ? tag[item.tagGroup.label] ? tag[item.tagGroup.label] : tag : tag }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag> |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button |
| | | v-if="o.type != 'upload'" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="o.icon | iconFn(scope.row)" |
| | | :plain="o.plain" |
| | | :size="o.size" |
| | | :style="{ color: o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | > |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change=" |
| | | (file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="o.limit ? o.limit : 1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept=" |
| | | o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " |
| | | v-if="o.type == 'upload'" |
| | | style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | > |
| | | <el-button |
| | | v-if="o.type!='upload'" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="o.icon | iconFn(scope.row)" |
| | | :plain="o.plain" :size="o.size" |
| | | :style="{ 'color': o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change="(file, fileList)=>o.clickFun(scope.row,file, fileList)" |
| | | :multiple="o.multiple?o.multiple:false" |
| | | :limit="o.limit?o.limit:1" |
| | | :size="o.size ? o.size : 'small'" |
| | | type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept="o.accept?o.accept:'.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'" |
| | | v-if="o.type=='upload'" style="display: inline-block;width: 50px;" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false"> |
| | | <el-button :size="o.size?o.size:'small'" type="text" :disabled="o.disabled ? o.disabled(scope.row) : false">{{o.name}}</el-button> |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ scope.row[item.prop] | formatters(item.formatData) }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table> |
| | | <pagination |
| | | v-show="page.total>0" |
| | | >{{ o.name }}</el-button |
| | | > |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table> |
| | | <pagination |
| | | v-show="page.total > 0" |
| | | :total="page.total" |
| | | :page.sync="page.current" |
| | | :limit.sync="page.size" |
| | | @pagination="pagination" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // 注ï¼ä»¥ä¸æ¯ææé
置项ï¼å
¶ä¸æå¸¸ä½¿ç¨çå°±æ¯labelãwidthãpropãdataTypeãslot |
| | | // label ï¼ååï¼å°±æ¯è¡¨å¤´ä¸çæ ç¾å«ä»ä¹äºä»ä¹ï¼ç±»å string |
| | | // widthï¼è¯¥åå®½åº¦ï¼ string |
| | | // propï¼ tableç»å®æ°æ®å段 string,è¿ä¸åè¦å±ç¤ºåªä¸ªtableDataéé¢çåæ®µå°±ååªä¸ªå段 |
| | | // dataTypeï¼ å
ç½®å¤ä¸ªåºæ¬çelementç»ä»¶å¯ä¾ç´æ¥ä½¿ç¨ string |
| | | // slot å½`dataType`为`slot`æ¶å¿
另忰ï¼åæ°å¼ä¸ºææ§½ç `slot` å¼ stringï¼å
·ä½ä½¿ç¨æ¹æ³è¯·çä¸é¢ç第4ç¹slotææ§½çä½¿ç¨ |
| | | // fixedï¼åæ¯å¦åºå®å¨å·¦ä¾§æè
å³ä¾§ï¼true 表示åºå®å¨å·¦ä¾§ string, boolean |
| | | // sortable 对åºåæ¯å¦å¯ä»¥æåº boolean, string |
| | | // filters æ°æ®è¿æ»¤çéé¡¹ï¼æ°ç»æ ¼å¼ï¼æ°ç»ä¸çå
ç´ éè¦æ text å value 屿§ãArray |
| | | // columnKey ï¼column ç keyï¼å¦æéè¦ä½¿ç¨ filter-change äºä»¶ï¼åéè¦æ¤å±æ§æ è¯æ¯åªä¸ª column çç鿡件 |
| | | // filteredValue éä¸çæ°æ®è¿æ»¤é¡¹ï¼å¦æéè¦èªå®ä¹è¡¨å¤´è¿æ»¤çæ¸²ææ¹å¼ï¼å¯è½ä¼éè¦æ¤å±æ§ã |
| | | // filterMultiple æ°æ®è¿æ»¤çé项æ¯å¦å¤é |
| | | // minWidth 对åºåçæå°å®½åº¦ï¼ä¸ width çåºå«æ¯ width æ¯åºå®çï¼min-width 伿å©ä½å®½åº¦ææ¯ä¾åé
ç»è®¾ç½®äº min-width çå string |
| | | // formatData å¯¹æ°æ®è¿è¡æ°æ®å¤çï¼æ¥åä¸ä¸ªåè°å½æ° (params?: {prop}) => {} |
| | | // formatType å½ `dataType`为 `tag`æ¶ï¼å¯¹æ ç¾é¢è²è®¾ç½® (params?: {prop}) => { return 'danger'| 'success'... }` |
| | | // operation å½ `dataType` 为 `option`æ¶ï¼å¯¹æé®ç é
ç½®ï¼å
·ä½é
置项以ä¸å¾ä¸ºåobject |
| | | // tagGroup å½ `dataType`为 `tag`æ¶ï¼ç»å®æ°æ®éåæ®µæ¾ç¤ºåç§° object |
| | | /** |
| | | * ææ§½çä½¿ç¨æ¹æ³: |
| | | */ |
| | | /* <div |
| | | <script> |
| | | // 注ï¼ä»¥ä¸æ¯ææé
置项ï¼å
¶ä¸æå¸¸ä½¿ç¨çå°±æ¯labelãwidthãpropãdataTypeãslot |
| | | // label ï¼ååï¼å°±æ¯è¡¨å¤´ä¸çæ ç¾å«ä»ä¹äºä»ä¹ï¼ç±»å string |
| | | // widthï¼è¯¥åå®½åº¦ï¼ string |
| | | // propï¼ tableç»å®æ°æ®å段 string,è¿ä¸åè¦å±ç¤ºåªä¸ªtableDataéé¢çåæ®µå°±ååªä¸ªå段 |
| | | // dataTypeï¼ å
ç½®å¤ä¸ªåºæ¬çelementç»ä»¶å¯ä¾ç´æ¥ä½¿ç¨ string |
| | | // slot å½`dataType`为`slot`æ¶å¿
另忰ï¼åæ°å¼ä¸ºææ§½ç `slot` å¼ stringï¼å
·ä½ä½¿ç¨æ¹æ³è¯·çä¸é¢ç第4ç¹slotææ§½çä½¿ç¨ |
| | | // fixedï¼åæ¯å¦åºå®å¨å·¦ä¾§æè
å³ä¾§ï¼true 表示åºå®å¨å·¦ä¾§ string, boolean |
| | | // sortable 对åºåæ¯å¦å¯ä»¥æåº boolean, string |
| | | // filters æ°æ®è¿æ»¤çéé¡¹ï¼æ°ç»æ ¼å¼ï¼æ°ç»ä¸çå
ç´ éè¦æ text å value 屿§ãArray |
| | | // columnKey ï¼column ç keyï¼å¦æéè¦ä½¿ç¨ filter-change äºä»¶ï¼åéè¦æ¤å±æ§æ è¯æ¯åªä¸ª column çç鿡件 |
| | | // filteredValue éä¸çæ°æ®è¿æ»¤é¡¹ï¼å¦æéè¦èªå®ä¹è¡¨å¤´è¿æ»¤çæ¸²ææ¹å¼ï¼å¯è½ä¼éè¦æ¤å±æ§ã |
| | | // filterMultiple æ°æ®è¿æ»¤çé项æ¯å¦å¤é |
| | | // minWidth 对åºåçæå°å®½åº¦ï¼ä¸ width çåºå«æ¯ width æ¯åºå®çï¼min-width 伿å©ä½å®½åº¦ææ¯ä¾åé
ç»è®¾ç½®äº min-width çå string |
| | | // formatData å¯¹æ°æ®è¿è¡æ°æ®å¤çï¼æ¥åä¸ä¸ªåè°å½æ° (params?: {prop}) => {} |
| | | // formatType å½ `dataType`为 `tag`æ¶ï¼å¯¹æ ç¾é¢è²è®¾ç½® (params?: {prop}) => { return 'danger'| 'success'... }` |
| | | // operation å½ `dataType` 为 `option`æ¶ï¼å¯¹æé®ç é
ç½®ï¼å
·ä½é
置项以ä¸å¾ä¸ºåobject |
| | | // tagGroup å½ `dataType`为 `tag`æ¶ï¼ç»å®æ°æ®éåæ®µæ¾ç¤ºåç§° object |
| | | /** |
| | | * ææ§½çä½¿ç¨æ¹æ³: |
| | | */ |
| | | /* <div |
| | | slot="protocolSlot" |
| | | slot-scope="scope" |
| | | > |
| | | <span>{{ scope.row.protocol }}</span> |
| | | </div> |
| | | */ |
| | | /** |
| | | * 使ç¨formatDataè¿è¡æ°æ®å¤ç |
| | | */ |
| | | // { |
| | | // type: '', |
| | | // label: 'å¯ç¨ç¶æ', |
| | | // prop: 'is_active', |
| | | // formatData: (item) => { |
| | | // const str = item == true ? 'å·²å¯ç¨' : 'æªå¯ç¨' |
| | | // return str |
| | | // } |
| | | // }, |
| | | /** |
| | | * operationé
ç½® |
| | | */ |
| | | // operationé
ç½®ä¸»è¦æ¯æ¥ç¨äºè¡¨æ ¼éé¢çæä½é£ä¸åï¼é叏就伿å¾å¤æé®ï¼æä»¥ä¸åæ°ï¼ |
| | | // nameï¼æé®åç§°ï¼string |
| | | // typeï¼æé®ç±»åï¼`string` | `danger | success`ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // sizeï¼æé®å¤§å°ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // iconï¼æé®ä¸çiconï¼ä»¥elementUi åæ°ä¸ºå |
| | | // plainï¼æelementUi ææ¡£ä¸ºå |
| | | // clickFunï¼æé®çåè°å½æ° |
| | | export default { |
| | | name: 'ZTTable', |
| | | filters: { |
| | | iconFn(val, row) { |
| | | if (typeof (val) === 'function') { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof (val) === 'function') { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | describeConts(val, describeCont) { |
| | | if (typeof (describeCont) === 'function') { |
| | | return describeCont(val); |
| | | } else return val; |
| | | }, |
| | | formatters(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return val; |
| | | } |
| | | /** |
| | | * 使ç¨formatDataè¿è¡æ°æ®å¤ç |
| | | */ |
| | | // { |
| | | // type: '', |
| | | // label: 'å¯ç¨ç¶æ', |
| | | // prop: 'is_active', |
| | | // formatData: (item) => { |
| | | // const str = item == true ? 'å·²å¯ç¨' : 'æªå¯ç¨' |
| | | // return str |
| | | // } |
| | | // }, |
| | | /** |
| | | * operationé
ç½® |
| | | */ |
| | | // operationé
ç½®ä¸»è¦æ¯æ¥ç¨äºè¡¨æ ¼éé¢çæä½é£ä¸åï¼é叏就伿å¾å¤æé®ï¼æä»¥ä¸åæ°ï¼ |
| | | // nameï¼æé®åç§°ï¼string |
| | | // typeï¼æé®ç±»åï¼`string` | `danger | success`ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // sizeï¼æé®å¤§å°ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // iconï¼æé®ä¸çiconï¼ä»¥elementUi åæ°ä¸ºå |
| | | // plainï¼æelementUi ææ¡£ä¸ºå |
| | | // clickFunï¼æé®çåè°å½æ° |
| | | export default { |
| | | name: "ZTTable", |
| | | filters: { |
| | | iconFn(val, row) { |
| | | if (typeof val === "function") { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | props: { |
| | | isSelection: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | tableLoading: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | border: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | headerCellStyle: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | column: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => { |
| | | |
| | | } |
| | | }, |
| | | rowStyle: { |
| | | type: Object || Function, |
| | | default: () => { |
| | | } |
| | | }, |
| | | tableData: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: undefined |
| | | }, |
| | | page:{ |
| | | type:Object, |
| | | default() { |
| | | return { |
| | | total:0, |
| | | current:0, |
| | | size:10 |
| | | }; |
| | | } |
| | | } |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof val === "function") { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | describeConts(val, describeCont) { |
| | | if (typeof describeCont === "function") { |
| | | return describeCont(val); |
| | | } else return val; |
| | | }, |
| | | formatters(val, format) { |
| | | if (typeof format === "function") { |
| | | return format(val); |
| | | } else return val; |
| | | }, |
| | | }, |
| | | props: { |
| | | isSelection: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: null, |
| | | }, |
| | | tableLoading: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => {}; |
| | | }, |
| | | }, |
| | | border: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | headerCellStyle: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | }, |
| | | }, |
| | | column: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | }, |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => {}, |
| | | }, |
| | | rowStyle: { |
| | | type: Object || Function, |
| | | default: () => {}, |
| | | }, |
| | | tableData: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | }, |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: undefined, |
| | | }, |
| | | page: { |
| | | type: Object, |
| | | default() { |
| | | return { |
| | | total: 0, |
| | | current: 0, |
| | | size: 10, |
| | | }; |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | formatType(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return ''; |
| | | }, |
| | | dataTypeFn(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return val; |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.multipleTable.setCurrentRow(); |
| | | }, |
| | | onExceed(){ |
| | | this.$message.warning('è¶
åºæä»¶ä¸ªæ°'); |
| | | }, |
| | | pagination(page,limit){ |
| | | this.$emit('pagination',{pageNum: page, pageSize: limit}); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | methods: { |
| | | formatType(val, format) { |
| | | if (typeof format === "function") { |
| | | return format(val); |
| | | } else return ""; |
| | | }, |
| | | dataTypeFn(val, format) { |
| | | if (typeof format === "function") { |
| | | return format(val); |
| | | } else return val; |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.multipleTable.setCurrentRow(); |
| | | }, |
| | | onExceed() { |
| | | this.$message.warning("è¶
åºæä»¶ä¸ªæ°"); |
| | | }, |
| | | pagination(page, limit) { |
| | | this.$emit("pagination", { pageNum: page, pageSize: limit }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center |
| | | } |
| | | </style> |
| | | <style scoped> |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="table_card"> |
| | | <div v-if="showTitle" class="title"> |
| | | <span style="font-weight: bold">{{ title }}</span> |
| | | </div> |
| | | <div> |
| | | <slot name="tab"></slot> |
| | | </div> |
| | | <div v-if="showForm" class="table_card_form"> |
| | | <slot name="form"></slot> |
| | | </div> |
| | | <div> |
| | | <slot name="table"></slot> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: 'æ é¢' |
| | | }, |
| | | showTitle: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | showForm: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return {}; |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .table_card { |
| | | text-align: left; |
| | | } |
| | | |
| | | .title { |
| | | position: relative; |
| | | font-size: 18px; |
| | | color: #333; |
| | | font-weight: 400; |
| | | padding-left: 10px; |
| | | margin-left: 15px; |
| | | } |
| | | |
| | | .title::before { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 4px; |
| | | content: ''; |
| | | width: 4px; |
| | | height: 18px; |
| | | background-color: #3A7BFA; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .table_card_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 34px; |
| | | padding: 0 15px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import iframeToggle from "./IframeToggle/index" |
| | | import iframeToggle from "./IframeToggle/index"; |
| | | |
| | | export default { |
| | | name: 'AppMain', |
| | | name: "AppMain", |
| | | components: { iframeToggle }, |
| | | computed: { |
| | | cachedViews() { |
| | | return this.$store.state.tagsView.cachedViews |
| | | return this.$store.state.tagsView.cachedViews; |
| | | }, |
| | | key() { |
| | | return this.$route.path |
| | | } |
| | | return this.$route.path; |
| | | }, |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | this.addIframe() |
| | | } |
| | | this.addIframe(); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.addIframe() |
| | | this.addIframe(); |
| | | }, |
| | | methods: { |
| | | addIframe() { |
| | | const {name} = this.$route |
| | | const { name } = this.$route; |
| | | if (name && this.$route.meta.link) { |
| | | this.$store.dispatch('tagsView/addIframeView', this.$route) |
| | | this.$store.dispatch("tagsView/addIframeView", this.$route); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | .hasTagsView { |
| | | .app-main { |
| | | /* 84 = navbar + tags-view = 50 + 34 */ |
| | | min-height: calc(100vh - 84px); |
| | | min-height: calc(100vh - 94px); |
| | | } |
| | | |
| | | .fixed-header + .app-main { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="work-time-management"> |
| | | <div style="text-align: left"> |
| | | <el-radio-group |
| | | v-model="currentComponent" |
| | | size="small" |
| | | style="margin-top: 16px; margin-left: 16px" |
| | | > |
| | | <el-radio-button |
| | | v-if="checkPermi(['performance:manHour:workTimeStatistics'])" |
| | | label="workTimeStatistics" |
| | | > |
| | | å·¥æ¶æ±æ» |
| | | </el-radio-button> |
| | | <el-radio-button |
| | | v-if="checkPermi(['performance:manHour:workTimeManagement'])" |
| | | label="workTimeManagement" |
| | | > |
| | | æ¥å·¥æ¶ç®¡ç |
| | | </el-radio-button> |
| | | <el-radio-button |
| | | v-if="checkPermi(['performance:manHour:workTimeConfig'])" |
| | | label="workTimeConfig" |
| | | > |
| | | è¾
å©å·¥æ¶é
ç½® |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <component :is="currentComponent"></component> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import workTimeStatistics from "./workTimeStatistics.vue"; |
| | | import workTimeManagement from "./workTimeManagement.vue"; |
| | | import workTimeConfig from "./workTimeConfig.vue"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | export default { |
| | | components: { |
| | | workTimeStatistics, |
| | | workTimeManagement, |
| | | workTimeConfig, |
| | | }, |
| | | created() {}, |
| | | data() { |
| | | return { |
| | | currentComponent: "workTimeStatistics", |
| | | }; |
| | | }, |
| | | methods: { |
| | | checkPermi, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="work-time-config"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="queryParams.number" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å®éªå®¤ï¼</div> |
| | | <el-select |
| | | v-model="queryParams.laboratory" |
| | | placeholder="å
¨é¨" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in laboratoryList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">é¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="queryParams.department" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | </div> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | style="position: absolute; right: 50px" |
| | | @click="openAdd" |
| | | >æ° å¢</el-button |
| | | > |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 150px)'" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from "@/components/Table/value-table.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | import { |
| | | selectAuxiliaryWorkingHours, |
| | | insertAuxiliaryWorkingHoursDay, |
| | | obtainItemParameterList, |
| | | } from "@/api/performance/manHour"; |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | laboratoryList: [], |
| | | partList: [], |
| | | addPower: true, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "ç¼å·", prop: "number" }, |
| | | { label: "è¾
å©é¡¹ç®åç§°", prop: "auxiliaryProject", width: "120px" }, |
| | | { label: "å®éªå®¤", prop: "laboratory" }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "æ ¸åå·¥æ¶", prop: "approvedWorkingHour" }, |
| | | { label: "é¨é¨", prop: "department" }, |
| | | { label: "夿³¨", prop: "remarks" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | width: "160px", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["standard:model:edit"]); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["standard:model:del"]); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | unitList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower(); |
| | | this.obtainItemParameterList(); |
| | | this.selectEnumByCategoryForUnit(); |
| | | }, |
| | | methods: { |
| | | checkPermi, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | selectAuxiliaryWorkingHours({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination(current, size) { |
| | | this.page.current = current; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem("power")); |
| | | let up = false; |
| | | let del = false; |
| | | let add = false; |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == "upDeviceParameter") { |
| | | up = true; |
| | | } |
| | | if (power[i].menuMethod == "delDeviceParameter") { |
| | | del = true; |
| | | } |
| | | if (power[i].menuMethod == "addDeviceParameter") { |
| | | add = true; |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1); |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1); |
| | | } |
| | | this.addPower = add; |
| | | }, |
| | | openAdd() { |
| | | // this.$refs.ValueTable0.openAddDia( |
| | | // this.$api.auxiliaryWorkingHours.insertAuxiliaryWorkingHours |
| | | // ); |
| | | }, |
| | | obtainItemParameterList() { |
| | | obtainItemParameterList().then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.laboratoryName, |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.laboratoryList = data; |
| | | }); |
| | | }, |
| | | selectEnumByCategoryForUnit() { |
| | | this.getDicts("sys_unit").then((response) => { |
| | | this.unitList = response.data; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .work-time-config { |
| | | height: 100%; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 250px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 70px); |
| | | } |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 24px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¥å·¥æ¶ç®¡ç--> |
| | | <div class="work-time-management"> |
| | | <div class="search"> |
| | | <div class="search_thing" style="width: 200px"> |
| | | <div class="search_label">ææï¼</div> |
| | | <el-select |
| | | v-model="entity.weekDay" |
| | | clearable |
| | | placeholder="å
¨é¨" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | > |
| | | <el-option |
| | | v-for="item in weekList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing" style="width: 390px"> |
| | | <div class="search_label" style="width: 90px">æ¶é´èå´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="entity.dateTime" |
| | | clearable |
| | | end-placeholder="ç»ææ¥æ" |
| | | format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | size="small" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | style="width: 100%" |
| | | type="daterange" |
| | | value-format="yyyy-MM-dd" |
| | | @change="refreshTable()" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <!-- 以ä¸è¿ä¸¤ä¸ªä¸ºç»é¿è§è²ç¹æç --> |
| | | <div class="search_thing" style="width: 200px"> |
| | | <div class="search_label">ååï¼</div> |
| | | <el-input |
| | | v-model="entity.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | <div |
| | | v-if="currentTable == 'ValueTable1'" |
| | | class="search_thing" |
| | | style="width: 250px" |
| | | > |
| | | <div class="search_label" style="width: 120px">æ ·åç¼å·ï¼</div> |
| | | <el-input |
| | | v-model="entity.sample" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | <div |
| | | v-if="currentTable == 'ValueTable0'" |
| | | class="search_thing" |
| | | style="width: 200px" |
| | | > |
| | | <div class="search_label">ç¶æï¼</div> |
| | | <el-select |
| | | v-model="entity.state" |
| | | placeholder="å
¨é¨" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | > |
| | | <el-option |
| | | v-for="item in stateList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px; width: 100px"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div |
| | | style="display: flex; align-items: center; justify-content: space-between" |
| | | > |
| | | <el-radio-group :key="'111'" v-model="currentTable" size="small"> |
| | | <el-radio-button label="ValueTable0"> è¾
å©å·¥æ¶ </el-radio-button> |
| | | <el-radio-button label="ValueTable1"> 产éå·¥æ¶ </el-radio-button> |
| | | </el-radio-group> |
| | | <div style="display: flex; align-items: center"> |
| | | <p style="font-size: 14px; margin-right: 30px"> |
| | | æ»å·¥æ¶æ±æ»ï¼<span |
| | | v-if="totalInfo" |
| | | style="font-size: 16px; color: #3a7bfa" |
| | | >{{ |
| | | totalInfo["产éå·¥æ¶æ±æ»"] + totalInfo["è¾
å©å·¥æ¶æ±æ»"] |
| | | ? Number( |
| | | totalInfo["产éå·¥æ¶æ±æ»"] + totalInfo["è¾
å©å·¥æ¶æ±æ»"] |
| | | ).tofixed(4) |
| | | : 0 |
| | | }}</span |
| | | > 产éå·¥æ¶æ±æ»ï¼<span |
| | | v-if="totalInfo" |
| | | style="font-size: 16px; color: #3a7bfa" |
| | | >{{ |
| | | totalInfo["产éå·¥æ¶æ±æ»"] |
| | | ? Number(totalInfo["产éå·¥æ¶æ±æ»"]).tofixed(4) |
| | | : 0 |
| | | }}</span |
| | | > è¾
å©å·¥æ¶æ±æ»ï¼<span |
| | | v-if="totalInfo" |
| | | style="font-size: 16px; color: #3a7bfa" |
| | | >{{ |
| | | totalInfo["è¾
å©å·¥æ¶æ±æ»"] |
| | | ? Number(totalInfo["è¾
å©å·¥æ¶æ±æ»"]).tofixed(4) |
| | | : 0 |
| | | }}</span |
| | | > |
| | | </p> |
| | | <el-button |
| | | v-show=" |
| | | currentTable == 'ValueTable0' && |
| | | checkPermi(['performance:manHour:workTimeManagement:add']) |
| | | " |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdd" |
| | | >å½å
¥æ°æ®</el-button |
| | | > |
| | | <el-button |
| | | v-if="down && currentTable === 'ValueTable0'" |
| | | :loading="outLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="handleOut" |
| | | >导 åº</el-button |
| | | > |
| | | <el-button |
| | | v-if="down && currentTable === 'ValueTable1'" |
| | | :loading="outLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="handleOut1" |
| | | >导 åº</el-button |
| | | > |
| | | <el-button |
| | | v-show=" |
| | | currentTable == 'ValueTable0' && |
| | | checkPermi(['performance:manHour:workTimeManagement:add']) |
| | | " |
| | | size="small" |
| | | type="primary" |
| | | @click="openBatchCheck(1)" |
| | | >æ¹éæ¹å</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 320px)'" |
| | | v-if="currentTable == 'ValueTable0'" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | | <lims-table |
| | | :tableData="tableData0" |
| | | :column="column0" |
| | | :page="page0" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 320px)'" |
| | | v-if="currentTable == 'ValueTable1'" |
| | | @pagination="pagination0" |
| | | ></lims-table> |
| | | </div> |
| | | <el-dialog |
| | | :before-close="handleClose" |
| | | :title="formData.id ? 'ç¼è¾' : 'å½å
¥æ°æ®'" |
| | | :visible.sync="addVisible" |
| | | width="600px" |
| | | > |
| | | <el-row style="display: flex; justify-content: space-around"> |
| | | <el-col :span="12"> |
| | | <el-form :model="formData" label-width="90px"> |
| | | <el-form-item label="å½å
¥æ¶é´:"> |
| | | <el-radio-group v-model="formData.dateTime" size="small"> |
| | | <el-radio :label="getYearAndMonthAndDays() + ' 00:00:00'" |
| | | >ä»å¤©</el-radio |
| | | > |
| | | <el-radio |
| | | :label=" |
| | | getYearAndMonthAndDays( |
| | | new Date(new Date().getTime() - 24 * 60 * 60 * 1000) |
| | | ) + ' 00:00:00' |
| | | " |
| | | >æ¨å¤©</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="年份:"> |
| | | <el-input |
| | | v-model="formData.year" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="卿¬¡:"> |
| | | <el-input |
| | | v-model="formData.week" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææ:"> |
| | | <!-- <el-input v-model="formData.weekDay" size="small" disabled></el-input> --> |
| | | <el-select |
| | | v-model="formData.weekDay" |
| | | disabled |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in weekList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬¡:"> |
| | | <el-input |
| | | v-model="formData.shift" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form :model="formData" label-width="90px"> |
| | | <el-form-item label="ç¼å·:" required> |
| | | <el-input |
| | | v-model="formData.number" |
| | | size="small" |
| | | @blur="getInfoByCode" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ°é:" required> |
| | | <el-input v-model="formData.amount" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ¸åå·¥æ¶:"> |
| | | <el-input |
| | | v-model="formData.approvedWorkingHour" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è¾
å©å·¥æ¶:"> |
| | | <el-input |
| | | v-model="formData.nonproductiveTime" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è¾
å©é¡¹ç®:"> |
| | | <el-input |
| | | v-model="formData.auxiliaryProject" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="formData" label-width="90px"> |
| | | <el-form-item label="è¾
å©è¯´æ:"> |
| | | <el-input |
| | | v-model="formData.remarks" |
| | | :rows="3" |
| | | size="small" |
| | | type="textarea" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button :loading="addLoad" type="primary" @click="submitAdd" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ¹åå¼¹æ¡--> |
| | | <el-dialog :title="title" :visible.sync="checkVisible" width="600px"> |
| | | <el-row style="display: flex; justify-content: space-around"> |
| | | <el-col :span="12"> |
| | | <el-form :model="formData0" label-width="90px"> |
| | | <el-form-item label="年份:"> |
| | | <el-input |
| | | v-model="formData0.year" |
| | | :disabled="title == 'æ¹å'" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="卿¬¡:"> |
| | | <el-input |
| | | v-model="formData0.week" |
| | | :disabled="title == 'æ¹å'" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææ:"> |
| | | <el-select |
| | | v-model="formData0.weekDay" |
| | | :disabled="title == 'æ¹å'" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in weekList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å§å:"> |
| | | <el-input |
| | | v-model="formData0.name" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬¡:"> |
| | | <el-select |
| | | v-model="formData0.shift" |
| | | :disabled="title == 'æ¹å'" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in classType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="夿 ¸è¯´æ:"> |
| | | <el-input |
| | | v-model="formData0.reviewerRemark" |
| | | :rows="3" |
| | | size="small" |
| | | type="textarea" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form :model="formData0" label-width="90px"> |
| | | <el-form-item label="ç¼å·:" required> |
| | | <el-input |
| | | v-model="formData0.number" |
| | | :disabled="title == 'æ¹å'" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ°é:" required> |
| | | <el-input |
| | | v-model="formData0.amount" |
| | | :disabled="title == 'æ¹å'" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿 ¸æ°é:" required> |
| | | <el-input |
| | | v-model="formData0.reviewerNumber" |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ¸åå·¥æ¶:"> |
| | | <el-input |
| | | v-model="formData0.approvedWorkingHour" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="夿 ¸å·¥æ¶:"> |
| | | <el-input |
| | | v-model="formData0.reviewerNonproductiveTime" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è¾
å©é¡¹ç®:"> |
| | | <el-input |
| | | v-model="formData0.auxiliaryProject" |
| | | disabled |
| | | size="small" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button :loading="checkLoadN" @click="submitCheck(0)" |
| | | >䏿¹å</el-button |
| | | > |
| | | <el-button |
| | | :loading="checkLoadY" |
| | | type="primary" |
| | | @click="submitCheck(1)" |
| | | >æ¹ å</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :before-close="closeBatchCheckDialog" |
| | | :title="batchCheckTitle" |
| | | :visible.sync="batchCheckDialog" |
| | | width="30%" |
| | | > |
| | | <span>{{ batchCheckDialogMessage }}</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="batchCheck(0)">䏿¹å</el-button> |
| | | <el-button type="primary" @click="batchCheck(1)">æ¹ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from "@/components/Table/value-table.vue"; |
| | | import { getYearAndMonthAndDays } from "@/utils/date"; |
| | | import { |
| | | selectAuxiliaryWorkingHoursDay, |
| | | selectAuxiliaryOutputWorkingHours, |
| | | deleteAuxiliaryWorkingHoursDay, |
| | | insertAuxiliaryWorkingHoursDay, |
| | | updateAuxiliaryWorkingHoursDay, |
| | | approve, |
| | | collectWorkingHours, |
| | | selectshiftByUser, |
| | | selectAuxiliaryWorkingHoursByNumber, |
| | | exportAssistantHours, |
| | | exportOutputHours, |
| | | } from "@/api/performance/manHour"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { checkPermi } from "@/utils/permission"; // æé夿彿° |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | limsTable, |
| | | }, |
| | | dicts: ["sys_class_type"], |
| | | data() { |
| | | return { |
| | | entity: { |
| | | dateTime: [], |
| | | }, |
| | | down: false, |
| | | addFileVisible: false, |
| | | weekList: [ |
| | | { label: "å¨ä¸", value: "å¨ä¸", type: "primary" }, |
| | | { label: "å¨äº", value: "å¨äº", type: "primary" }, |
| | | { label: "å¨ä¸", value: "å¨ä¸", type: "primary" }, |
| | | { label: "å¨å", value: "å¨å", type: "primary" }, |
| | | { label: "å¨äº", value: "å¨äº", type: "primary" }, |
| | | { label: "å¨å
", value: "å¨å
", type: "primary" }, |
| | | { label: "卿¥", value: "卿¥", type: "primary" }, |
| | | ], |
| | | currentTable: "ValueTable0", |
| | | addVisible: false, |
| | | addLoad: false, |
| | | formData: { |
| | | dateTime: getYearAndMonthAndDays() + " 00:00:00", |
| | | year: new Date().getFullYear(), |
| | | week: this.getCurrentWeekNumber(), |
| | | weekDay: this.getWeek(), |
| | | shift: "", |
| | | number: "", |
| | | amount: "", |
| | | approvedWorkingHour: "", // æ ¸åå·¥æ¶ |
| | | nonproductiveTime: "", |
| | | auxiliaryProject: "", |
| | | remarks: "", |
| | | }, |
| | | formData0: { |
| | | dateTime: 0, |
| | | year: new Date().getFullYear(), |
| | | week: this.getCurrentWeekNumber(), |
| | | weekDay: this.getWeek(), |
| | | createUser: "", |
| | | shift: "", |
| | | number: "", |
| | | reviewerNumber: "", // 夿 ¸æ°é |
| | | approvedWorkingHour: "", // æ ¸åå·¥æ¶ |
| | | reviewerNonproductiveTime: "", // 夿 ¸å·¥æ¶ |
| | | auxiliaryProject: "", |
| | | reviewerRemark: "", |
| | | nameUser: "", |
| | | name: "", |
| | | }, |
| | | checkVisible: false, |
| | | checkLoadN: false, |
| | | checkLoadY: false, |
| | | title: "æ¹å", |
| | | classType: [], |
| | | stateList: [ |
| | | { |
| | | value: "å·²æäº¤", |
| | | label: "å·²æäº¤", |
| | | }, |
| | | { |
| | | value: "å·²å®¡æ ¸", |
| | | label: "å·²å®¡æ ¸", |
| | | }, |
| | | { |
| | | value: "å·²æ¹å", |
| | | label: "å·²æ¹å", |
| | | }, |
| | | { |
| | | value: "䏿¹å", |
| | | label: "䏿¹å", |
| | | }, |
| | | ], |
| | | totalInfo: null, |
| | | auxiliaryWorking: null, |
| | | outLoading: false, |
| | | batchCheckTitle: "æ¹éå®¡æ ¸", |
| | | batchCheckDialog: false, |
| | | ValueTable0Selected: [], |
| | | batchCheckDialogMessage: "", |
| | | tableData: [], |
| | | column: [ |
| | | { label: "å§å", prop: "name" }, |
| | | { label: "ç¼å·", prop: "number" }, |
| | | { label: "è¾
å©é¡¹ç®åç§°", prop: "auxiliaryProject", width: "120px" }, |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "state", |
| | | dataType: "tag", |
| | | formatType: (params) => { |
| | | if (params == "å·²æäº¤") { |
| | | return "primary"; |
| | | } else if (params == "å·²å®¡æ ¸") { |
| | | return "warning"; |
| | | } else if (params == "å·²æ¹å") { |
| | | return "success"; |
| | | } else if (params == "䏿¹å") { |
| | | return "danger"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "æ ¸åå·¥æ¶", prop: "approvedWorkingHour" }, |
| | | { label: "æ°é", prop: "amount" }, |
| | | { label: "è¾
å©å·¥æ¶", prop: "nonproductiveTime" }, |
| | | { label: "è¾
å©è¯´æ", prop: "remarks" }, |
| | | { label: "夿 ¸äºº", prop: "reviewer" }, |
| | | { label: "夿 ¸æ°é", prop: "reviewerNumber" }, |
| | | { label: "夿 ¸å·¥æ¶", prop: "reviewerNonproductiveTime" }, |
| | | { label: "夿 ¸è¯´æ", prop: "reviewerRemark" }, |
| | | { label: "å¹´", prop: "year" }, |
| | | { |
| | | label: "çæ¬¡", |
| | | prop: "shift", |
| | | dataType: "tag", |
| | | formatData: this.shifList, |
| | | }, |
| | | { label: "卿¬¡", prop: "week" }, |
| | | { label: "ææ", prop: "weekDay" }, |
| | | { label: "å建æ¶é´", prop: "createTime" }, |
| | | { label: "æ¥æ", prop: "dateTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | width: "160px", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "performance:manHour:workTimeManagement:edit", |
| | | ]); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state === "å·²æ¹å"; |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "sperformance:manHour:workTimeManagement:del", |
| | | ]); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state === "å·²æ¹å"; |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleRatify(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "performance:manHour:workTimeManagement:ratify", |
| | | ]); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state === "å·²æ¹å"; |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "æ£æµäºº", prop: "name" }, |
| | | { label: "æ£æµé¡¹åç±»", prop: "inspectionItemClass" }, |
| | | { label: "æ£æµé¡¹", prop: "inspectionItem" }, |
| | | { label: "æ£æµå项", prop: "inspectionItemSubclass" }, |
| | | { label: "æ ·åç¼å·", prop: "sample" }, |
| | | { label: "å§æåå·", prop: "orderNo" }, |
| | | { label: "çµç¼æ è¯", prop: "cableTag" }, |
| | | { label: "产éå·¥æ¶", prop: "outputWorkTime" }, |
| | | { label: "å·¥æ¶åç»", prop: "manHourGroup" }, |
| | | { label: "åä»·", prop: "price" }, |
| | | { label: "æ¥æ", prop: "dateTime" }, |
| | | { label: "卿¬¡", prop: "week" }, |
| | | { label: "ææ", prop: "weekDay" }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | shifList: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | | "formData.dateTime"(val) { |
| | | if (val == getYearAndMonthAndDays() + " 00:00:00") { |
| | | this.formData.year = new Date().getFullYear(); |
| | | this.formData.week = this.getCurrentWeekNumber(); |
| | | this.formData.weekDay = this.getWeek(); |
| | | } else { |
| | | var today = new Date(); // è·åå½åæ¥æ |
| | | var yesterday = new Date(today); // å¤å¶å½åæ¥æ |
| | | yesterday.setDate(today.getDate() - 1); // 设置为åä¸å¤© |
| | | var timestamp = new Date(yesterday.getTime()); |
| | | this.formData.year = timestamp.getFullYear(); |
| | | this.formData.week = this.getCurrentWeekNumber(timestamp); |
| | | this.formData.weekDay = this.getWeek(timestamp); |
| | | } |
| | | }, |
| | | "formData.amount"(val) { |
| | | if (val) { |
| | | if (!isNaN(val)) { |
| | | if (this.formData.approvedWorkingHour) { |
| | | this.formData.nonproductiveTime = |
| | | this.formData.approvedWorkingHour * val; |
| | | } |
| | | } else { |
| | | this.$message.error("请è¾å
¥æ°å"); |
| | | this.formData.amount = ""; |
| | | } |
| | | } |
| | | }, |
| | | "formData.approvedWorkingHour"(val) { |
| | | if (val && this.formData.amount) { |
| | | this.formData.nonproductiveTime = this.formData.amount * val; |
| | | } |
| | | }, |
| | | "formData0.reviewerNumber"(val) { |
| | | if (val) { |
| | | if (!isNaN(val)) { |
| | | if (this.formData0.approvedWorkingHour) { |
| | | this.formData0.reviewerNonproductiveTime = |
| | | this.formData0.approvedWorkingHour * val; |
| | | } |
| | | } else { |
| | | this.$message.error("请è¾å
¥æ°å"); |
| | | this.formData0.reviewerNumber = ""; |
| | | } |
| | | } |
| | | }, |
| | | "formData0.approvedWorkingHour"(val) { |
| | | if (val && this.formData0.reviewerNumber) { |
| | | this.formData0.reviewerNonproductiveTime = |
| | | this.formData0.reviewerNumber * val; |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.setDate(); |
| | | this.getDicts("sys_class_type").then((response) => { |
| | | this.shifList = response.data; |
| | | }); |
| | | }, |
| | | mounted() { |
| | | this.getCurrentWeekNumber(); |
| | | this.collectWorkingHours(); |
| | | this.selectshiftByUser(); |
| | | this.getList(); |
| | | this.getList0(); |
| | | }, |
| | | methods: { |
| | | checkPermi, |
| | | getList(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | | if (entity) { |
| | | param = { ...entity, ...this.page }; |
| | | } else { |
| | | param = { ...this.entity, ...this.page }; |
| | | } |
| | | delete param.total; |
| | | selectAuxiliaryWorkingHoursDay({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | getList0(entity) { |
| | | this.tableLoading = true; |
| | | let param = {}; |
| | | if (entity) { |
| | | param = { ...entity, ...this.page0 }; |
| | | } else { |
| | | param = { ...this.entity, ...this.page0 }; |
| | | } |
| | | delete param.total; |
| | | selectAuxiliaryOutputWorkingHours({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination(current, size) { |
| | | this.page.current = current; |
| | | this.getList(); |
| | | }, |
| | | pagination0(current, size) { |
| | | this.page0.current = current; |
| | | this.getList(); |
| | | }, |
| | | /** å°æ¶é´éæ©å¨é»è®¤é为å½å¤©çæ¥æ */ |
| | | setDate() { |
| | | let currentDate = new Date(); |
| | | let year = currentDate.getFullYear(); |
| | | let month = String(currentDate.getMonth() + 1).padStart(2, "0"); |
| | | let day = String(currentDate.getDate()).padStart(2, "0"); |
| | | let formattedDate1 = `${year}-${month}-${day}`; |
| | | let formattedDate2 = `${year}-${month}-${day}`; |
| | | this.entity.dateTime.push(formattedDate1); |
| | | this.entity.dateTime.push(formattedDate2); |
| | | this.refreshTable(); |
| | | }, |
| | | getYearAndMonthAndDays(date) { |
| | | return getYearAndMonthAndDays(date); |
| | | }, |
| | | refreshTable(e) { |
| | | let entity = {}; |
| | | if (this.entity.week1 && this.entity.week2) { |
| | | entity.week = JSON.stringify([this.entity.week1, this.entity.week2]); |
| | | } else { |
| | | entity.week = ""; |
| | | } |
| | | if (this.entity.dateTime) { |
| | | entity.dateTime = JSON.stringify(this.entity.dateTime); |
| | | } else { |
| | | entity.dateTime = ""; |
| | | } |
| | | entity.weekDay = this.entity.weekDay; |
| | | entity.name = this.entity.name; |
| | | entity.sample = this.entity.sample; |
| | | if (this.currentTable == "ValueTable0") { |
| | | entity.state = this.entity.state; |
| | | this.page.current = 1; |
| | | this.getList(entity); |
| | | } else { |
| | | this.page0.current = 1; |
| | | this.getList0(entity); |
| | | } |
| | | this.collectWorkingHours(); |
| | | }, |
| | | refresh() { |
| | | this.entity = {}; |
| | | this.refreshTable(); |
| | | }, |
| | | openAdd() { |
| | | this.formData = { |
| | | dateTime: getYearAndMonthAndDays() + " 00:00:00", |
| | | year: new Date().getFullYear(), |
| | | week: this.getCurrentWeekNumber(), |
| | | weekDay: this.getWeek(), |
| | | shift: "", |
| | | number: "", |
| | | amount: "", |
| | | approvedWorkingHour: "", |
| | | nonproductiveTime: "", |
| | | auxiliaryProject: "", |
| | | remarks: "", |
| | | }; |
| | | this.addVisible = true; |
| | | }, |
| | | handleEdit(row) { |
| | | this.formData = row; |
| | | this.addVisible = true; |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | deleteAuxiliaryWorkingHoursDay({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("å 餿å"); |
| | | this.refreshTable("page"); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | handleClose() { |
| | | this.addVisible = false; |
| | | }, |
| | | submitAdd() { |
| | | if (!this.formData.number) { |
| | | this.$message.error("请è¾å
¥ç¼å·"); |
| | | return; |
| | | } |
| | | if (!this.formData.amount) { |
| | | this.$message.error("请è¾å
¥æ°é"); |
| | | return; |
| | | } |
| | | this.addLoad = true; |
| | | if (!this.formData.id) { |
| | | insertAuxiliaryWorkingHoursDay(this.formData).then((res) => { |
| | | this.addLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("å·²æäº¤"); |
| | | this.formData.number = ""; |
| | | this.formData.amount = ""; |
| | | this.formData.remarks = ""; |
| | | this.formData.approvedWorkingHour = ""; |
| | | this.formData.nonproductiveTime = ""; |
| | | this.formData.auxiliaryProject = ""; |
| | | this.addVisible = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | }); |
| | | } else { |
| | | updateAuxiliaryWorkingHoursDay(this.formData).then((res) => { |
| | | this.addLoad = false; |
| | | if (res.code == 201) return; |
| | | this.$message.success("æä½æå"); |
| | | this.formData.number = ""; |
| | | this.formData.amount = ""; |
| | | this.formData.remarks = ""; |
| | | this.formData.approvedWorkingHour = ""; |
| | | this.formData.nonproductiveTime = ""; |
| | | this.formData.auxiliaryProject = ""; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | }); |
| | | } |
| | | }, |
| | | handleRatify(row) { |
| | | this.title = "æ¹å"; |
| | | this.formData0 = row; |
| | | this.checkVisible = true; |
| | | this.formData0.reviewerNumber = this.formData0.amount; |
| | | if (this.formData0.approvedWorkingHour && this.formData0.reviewerNumber) { |
| | | this.formData0.reviewerNonproductiveTime = |
| | | this.formData0.approvedWorkingHour * this.formData0.reviewerNumber; |
| | | } |
| | | }, |
| | | handleChangeTask(row) { |
| | | this.ValueTable0Selected = JSON.parse(JSON.stringify(row)); |
| | | }, |
| | | openBatchCheck(e) { |
| | | if (this.ValueTable0Selected.length > 0) { |
| | | const isApprove = this.ValueTable0Selected.every( |
| | | (item) => item.state !== "å·²æ¹å" |
| | | ); |
| | | this.batchCheckTitle = "æ¹éæ¹å"; |
| | | this.batchCheckDialogMessage = "æ¯å¦å
¨é¨éè¿æ¹å?"; |
| | | if (isApprove) { |
| | | this.batchCheckDialog = true; |
| | | } else { |
| | | this.$message.error("è¯·éæ©æªæ¹åçæ°æ®"); |
| | | } |
| | | } else { |
| | | this.$message.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | }, |
| | | batchCheck(e) { |
| | | this.$refs.ValueTable0.batchCheck(e); |
| | | }, |
| | | closeBatchCheckDialog() { |
| | | this.batchCheckDialog = false; |
| | | }, |
| | | submitBatchCheckDialog() { |
| | | this.batchCheckDialog = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | }, |
| | | submitCheck(e) { |
| | | if (!this.formData0.number) { |
| | | this.$message.error("请è¾å
¥ç¼å·"); |
| | | return; |
| | | } |
| | | if (!this.formData0.amount) { |
| | | this.$message.error("请è¾å
¥æ°é"); |
| | | return; |
| | | } |
| | | if (e == 0) { |
| | | this.checkLoadN = true; |
| | | } else { |
| | | this.checkLoadY = true; |
| | | } |
| | | this.formData0.state = e == 0 ? "䏿¹å" : "å·²æ¹å"; |
| | | approve({ |
| | | auxiliaryWorkingHoursDays: [this.formData0], |
| | | }).then((res) => { |
| | | if (e == 0) { |
| | | this.checkLoadN = false; |
| | | } else { |
| | | this.checkLoadY = false; |
| | | } |
| | | if (res.code == 201) return; |
| | | this.$message.success("æä½æå"); |
| | | this.checkVisible = false; |
| | | this.refreshTable("page"); |
| | | this.collectWorkingHours(); |
| | | }); |
| | | }, |
| | | getCurrentWeekNumber(now = new Date()) { |
| | | const startOfWeek = new Date( |
| | | now.getFullYear(), |
| | | now.getMonth(), |
| | | now.getDate() - now.getDay() |
| | | ); // å¨å¤© |
| | | const firstWeekOfYear = new Date(startOfWeek.getFullYear(), 0, 0); // å½å¹´ç第ä¸ä¸ªå¨å¤© |
| | | const firstWeekOfNextYear = new Date( |
| | | firstWeekOfYear.getFullYear() + 1, |
| | | 0, |
| | | 0 |
| | | ); // ä¸ä¸å¹´ç第ä¸ä¸ªå¨å¤© |
| | | const daysSinceNewYear = |
| | | (startOfWeek - firstWeekOfYear) / (24 * 60 * 60 * 1000); // 计ç®èªæ°å¹´ä»¥æ¥çå¤©æ° |
| | | const weeksSinceNewYear = Math.floor(daysSinceNewYear / 7); // 天æ°é¤ä»¥7å¾å°å¨æ° |
| | | |
| | | if (startOfWeek > now) { |
| | | // 妿å½åå¨çå¨å¤©è¿æ²¡å°ï¼åè¿åä¸å¹´çæåä¸å¨ |
| | | return weeksSinceNewYear; |
| | | } else if (firstWeekOfNextYear <= now) { |
| | | // 妿å½åå¨çå¨å¤©å·²ç»è¿äºï¼åè¿åå½å¹´ç卿° |
| | | return weeksSinceNewYear + 1; |
| | | } else { |
| | | // å¦åè¿åå½å¹´çæåä¸å¨ |
| | | return weeksSinceNewYear + 2; |
| | | } |
| | | }, |
| | | getWeek(e = new Date()) { |
| | | // let str = 'æ¥ä¸äºä¸åäºå
' |
| | | let d = e.getDay(); |
| | | // let c = str.charAt(d) |
| | | // return `å¨${c}` |
| | | return String(d); |
| | | }, |
| | | // ç»è®¡äº§éå·¥æ¶æ±æ»åè¾
å©å·¥æ¶æ±æ» |
| | | collectWorkingHours() { |
| | | let entity = {}; |
| | | if (this.entity.week1 && this.entity.week2) { |
| | | entity.week = JSON.stringify([this.entity.week1, this.entity.week2]); |
| | | } else { |
| | | entity.week = ""; |
| | | } |
| | | if (this.entity.dateTime) { |
| | | entity.dateTime = JSON.stringify(this.entity.dateTime); |
| | | } else { |
| | | entity.dateTime = ""; |
| | | } |
| | | entity.weekDay = this.entity.weekDay; |
| | | entity.name = this.entity.name; |
| | | collectWorkingHours({ entity: entity }).then((res) => { |
| | | this.totalInfo = res.data; |
| | | }); |
| | | }, |
| | | selectshiftByUser() { |
| | | selectshiftByUser().then((res) => { |
| | | this.formData.shift = res.data; |
| | | }); |
| | | }, |
| | | getInfoByCode() { |
| | | if (this.formData.number) { |
| | | selectAuxiliaryWorkingHoursByNumber(this.formData.number).then( |
| | | (res) => { |
| | | this.auxiliaryWorking = res.data; |
| | | if (this.addVisible) { |
| | | this.formData.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } else if (this.title == "å®¡æ ¸" && this.checkVisible) { |
| | | this.formData0.approvedWorkingHour = |
| | | this.auxiliaryWorking.approvedWorkingHour; |
| | | this.formData0.auxiliaryProject = |
| | | this.auxiliaryWorking.auxiliaryProject; |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | }, |
| | | handleOut() { |
| | | let entity = this.HaveJson(this.entity); |
| | | if (this.entity.dateTime) { |
| | | entity.dateTime = JSON.stringify(this.entity.dateTime); |
| | | } else { |
| | | entity.dateTime = ""; |
| | | } |
| | | this.outLoading = true; |
| | | exportAssistantHours({ entity: entity }) |
| | | .then((res) => { |
| | | this.outLoading = false; |
| | | this.$message.success("å¯¼åºæå"); |
| | | const blob = new Blob([res]); |
| | | this.$download.saveAs(blob, "è¾
å©å·¥æ¶ä¿¡æ¯å¯¼åº.xlsx"); |
| | | }) |
| | | .catch((err) => { |
| | | this.outLoading = false; |
| | | }); |
| | | }, |
| | | handleOut1() { |
| | | let entity = this.HaveJson(this.entity); |
| | | if (this.entity.dateTime) { |
| | | entity.dateTime = JSON.stringify(this.entity.dateTime); |
| | | } else { |
| | | entity.dateTime = ""; |
| | | } |
| | | this.outLoading = true; |
| | | exportOutputHours({ entity: entity }) |
| | | .then((res) => { |
| | | this.outLoading = false; |
| | | this.$message.success("å¯¼åºæå"); |
| | | const blob = new Blob([res]); |
| | | this.$download.saveAs(blob, "产éå·¥æ¶ä¿¡æ¯å¯¼åº.xlsx"); |
| | | }) |
| | | .catch((err) => { |
| | | this.outLoading = false; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .work-time-management { |
| | | height: 100%; |
| | | overflow-y: scroll; |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | /* scrollbar-width: none; */ |
| | | } |
| | | /* .work-time-management::-webkit-scrollbar { |
| | | display: none; |
| | | } */ |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 300px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 70px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 70px); |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æï¼</div> |
| | | <div class="search_input" style="display: flex; align-items: center"> |
| | | <el-date-picker |
| | | v-model="queryParams.month" |
| | | :clearable="false" |
| | | format="yyyy-MM" |
| | | placeholder="éæ©æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="month" |
| | | value-format="yyyy-MM" |
| | | @change="refreshTable()" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå·¥ï¼</div> |
| | | <el-input |
| | | v-model="queryParams.name" |
| | | clearable |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="tableColumn" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | :page="page" |
| | | style="padding: 0 15px" |
| | | > |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getYearAndMonthAndDays } from "@/utils/date"; |
| | | import TableCard from "@/components/TableCard/index.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { selectAuxiliaryAllByMonth } from "@/api/performance/manHour"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | TableCard, |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | month: getYearAndMonthAndDays().slice(0, 7), |
| | | name: "", |
| | | departLims: "", |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: "å§å", |
| | | minWidth: "120px", |
| | | prop: "userName", |
| | | }, |
| | | { |
| | | label: "æä»½", |
| | | minWidth: "120px", |
| | | prop: "month", |
| | | }, |
| | | { |
| | | label: "产éå·¥æ¶", |
| | | minWidth: "120px", |
| | | prop: "yieldHour", |
| | | }, |
| | | { |
| | | label: "è¾
å©å·¥æ¶", |
| | | minWidth: "120px", |
| | | prop: "subsidiaryHour", |
| | | }, |
| | | { |
| | | label: "æ»å·¥æ¶", |
| | | minWidth: "120px", |
| | | prop: "totalHour", |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.tableLoading = true; |
| | | selectAuxiliaryAllByMonth(this.queryParams) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data; |
| | | }) |
| | | .catch(() => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = { |
| | | month: getYearAndMonthAndDays().slice(0, 7), |
| | | name: "", |
| | | departLims: "", |
| | | }; |
| | | this.refreshTable(); |
| | | }, |
| | | // å页 |
| | | handleCurrent(page) { |
| | | this.pagination.curent = page; |
| | | this.refreshTable(); |
| | | }, |
| | | handleSizeChange(size) { |
| | | this.pagination.pageSize = size; |
| | | this.refreshTable(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .work-time-statistics { |
| | | height: 100%; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 270px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 60px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 60px); |
| | | } |
| | | .table { |
| | | height: calc(100% - 60px - 80px - 10px - 40px - 25px); |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="btn"> |
| | | <el-button |
| | | v-if="checkPermi(['system:standard:model:add'])" |
| | | v-if="checkPermi(['standard:model:add'])" |
| | | size="small" |
| | | type="primary" |
| | | @click="openAdd" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button |
| | | v-if="checkPermi(['system:standard:model:copy'])" |
| | | <!-- <el-button |
| | | v-if="checkPermi(['standard:model:copy'])" |
| | | size="small" |
| | | @click="copyTemplate" |
| | | >å¤å¶æ¨¡ç</el-button |
| | | > |
| | | > --> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100% - 200px)'" |
| | | ></lims-table> |
| | | </div> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 240px)'" |
| | | style="padding: 20px; padding-top: 0" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | | <el-dialog |
| | | :before-close="isClose" |
| | | :close-on-click-modal="false" |
| | |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | width: "180px", |
| | | width: "320px", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | |
| | | this.isShowCopyTem = true; |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["system:standard:model:edit"]); |
| | | return this.checkPermi(["standard:model:edit"]); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | this.handleDelete(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["system:standard:model:del"]); |
| | | return this.checkPermi(["standard:model:del"]); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | this.copyTemplate(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi(["system:standard:model:copy"]); |
| | | return this.checkPermi(["standard:model:copy"]); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "system:standard:model:edit", |
| | | "system:standard:model:add", |
| | | "standard:model:edit", |
| | | "standard:model:add", |
| | | ]); |
| | | }, |
| | | }, |
| | |
| | | checkPermi, |
| | | getList() { |
| | | this.tableLoading = true; |
| | | selectStandardTemplatePageList({ ...this.queryParams, ...this.page }) |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | selectStandardTemplatePageList({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data; |
| | | this.page.total = res.total; |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination(current, size) { |
| | | this.page.current = current; |
| | | this.getList(); |
| | | }, |
| | | refreshTable(e) { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | openAdd() { |
| | |
| | | }); |
| | | break; |
| | | case "ç¼è¾": |
| | | params.thing = row.thing; |
| | | params.thing = this.copyForm.thing ? this.copyForm.thing : ""; |
| | | upStandardTemplate(params) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | |
| | | return; |
| | | } |
| | | this.row = row; |
| | | this.row.thing = res.data; |
| | | this.row.thing = res.msg; |
| | | this.isShow = true; |
| | | }); |
| | | }, |
| | |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | width: 90px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | |
| | | } |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | right: 14px; |
| | | top: 20px; |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | padding: 10px; |
| | | padding-top: 0; |
| | | } |
| | | </style> |
| | |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col |
| | | v-if="checkPermi(['system:standard:standardLibrary:add'])" |
| | | v-if="checkPermi(['standard:standardLibrary:add'])" |
| | | :span="4" |
| | | style="text-align: center; line-height: 30px" |
| | | > |
| | |
| | | </el-col> |
| | | <el-col |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:delStandardTree', |
| | | ]) && |
| | | checkPermi(['standard:standardLibrary:delStandardTree']) && |
| | | (node.data.children === null || |
| | | node.data.children === undefined) |
| | | " |
| | |
| | | </el-col> |
| | | <el-col |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:delStandardTree', |
| | | ]) && |
| | | checkPermi(['standard:standardLibrary:delStandardTree']) && |
| | | (node.data.children === null || |
| | | node.data.children === undefined) |
| | | " |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.ask" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.tell" |
| | | :autosize="{ minRows: 1, maxRows: 3 }" |
| | |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.methodS" |
| | | clearable |
| | |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.radius" |
| | | clearable |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.price" |
| | | placeholder="åä»·(å
)" |
| | |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-if=" |
| | | checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | v-model="scope.row.manHour" |
| | | placeholder="åä»·(å
)" |
| | |
| | | <el-select |
| | | v-model="scope.row.templateId" |
| | | :disabled=" |
| | | !checkPermi([ |
| | | 'system:standard:standardLibrary:upStandardProduct', |
| | | ]) |
| | | !checkPermi(['standard:standardLibrary:upStandardProduct']) |
| | | " |
| | | filterable |
| | | size="small" |
| | |
| | | 'use strict' |
| | | const path = require('path') |
| | | "use strict"; |
| | | const path = require("path"); |
| | | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | | return path.join(__dirname, dir); |
| | | } |
| | | |
| | | const CompressionPlugin = require('compression-webpack-plugin') |
| | | const CompressionPlugin = require("compression-webpack-plugin"); |
| | | |
| | | const name = process.env.VUE_APP_TITLE || 'è¥ä¾ç®¡çç³»ç»' // ç½é¡µæ é¢ |
| | | const name = process.env.VUE_APP_TITLE || "è¥ä¾ç®¡çç³»ç»"; // ç½é¡µæ é¢ |
| | | |
| | | const port = process.env.port || process.env.npm_config_port || 80 // ç«¯å£ |
| | | const port = process.env.port || process.env.npm_config_port || 80; // ç«¯å£ |
| | | |
| | | // vue.config.js é
置说æ |
| | | //宿¹vue.config.js åèææ¡£ https://cli.vuejs.org/zh/config/#css-loaderoptions |
| | |
| | | // ä¾å¦ https://www.ruoyi.vip/ã妿åºç¨è¢«é¨ç½²å¨ä¸ä¸ªåè·¯å¾ä¸ï¼ä½ å°±éè¦ç¨è¿ä¸ªé项æå®è¿ä¸ªåè·¯å¾ãä¾å¦ï¼å¦æä½ çåºç¨è¢«é¨ç½²å¨ https://www.ruoyi.vip/admin/ï¼å设置 baseUrl 为 /admin/ã |
| | | publicPath: process.env.NODE_ENV === "production" ? "/" : "/", |
| | | // å¨npm run build æ yarn build æ¶ ï¼çææä»¶çç®å½åç§°ï¼è¦åbaseUrlçç产ç¯å¢è·¯å¾ä¸è´ï¼ï¼é»è®¤distï¼ |
| | | outputDir: 'dist', |
| | | outputDir: "dist", |
| | | // ç¨äºæ¾ç½®çæçéæèµæº (jsãcssãimgãfonts) çï¼ï¼é¡¹ç®æå
ä¹åï¼éæèµæºä¼æ¾å¨è¿ä¸ªæä»¶å¤¹ä¸ï¼ |
| | | assetsDir: 'static', |
| | | assetsDir: "static", |
| | | // æ¯å¦å¼å¯eslintä¿åæ£æµï¼ææå¼ï¼ture | false | 'error' |
| | | lintOnSave: process.env.NODE_ENV === 'development', |
| | | lintOnSave: process.env.NODE_ENV === "development", |
| | | // å¦æä½ ä¸éè¦ç产ç¯å¢ç source mapï¼å¯ä»¥å°å
¶è®¾ç½®ä¸º false 以å éç产ç¯å¢æå»ºã |
| | | productionSourceMap: false, |
| | | transpileDependencies: ['quill'], |
| | | transpileDependencies: ["quill"], |
| | | // webpack-dev-server ç¸å
³é
ç½® |
| | | devServer: { |
| | | host: '0.0.0.0', |
| | | host: "0.0.0.0", |
| | | port: port, |
| | | open: true, |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://192.168.1.36:8002`, |
| | | target: `http://192.168.0.104:8002`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |
| | | } |
| | | } |
| | | ["^" + process.env.VUE_APP_BASE_API]: "", |
| | | }, |
| | | }, |
| | | }, |
| | | disableHostCheck: true |
| | | disableHostCheck: true, |
| | | }, |
| | | css: { |
| | | loaderOptions: { |
| | | sass: { |
| | | sassOptions: { outputStyle: "expanded" } |
| | | } |
| | | } |
| | | sassOptions: { outputStyle: "expanded" }, |
| | | }, |
| | | }, |
| | | }, |
| | | configureWebpack: { |
| | | name: name, |
| | | resolve: { |
| | | alias: { |
| | | '@': resolve('src') |
| | | } |
| | | "@": resolve("src"), |
| | | }, |
| | | }, |
| | | plugins: [ |
| | | // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使ç¨gzipè§£åç¼©éææä»¶ |
| | | new CompressionPlugin({ |
| | | cache: false, // ä¸å¯ç¨æä»¶ç¼å |
| | | test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // å缩æä»¶æ ¼å¼ |
| | | filename: '[path][base].gz[query]', // å缩åçæä»¶å |
| | | algorithm: 'gzip', // 使ç¨gzipå缩 |
| | | minRatio: 0.8, // å缩æ¯ä¾ï¼å°äº 80% çæä»¶ä¸ä¼è¢«å缩 |
| | | deleteOriginalAssets: false // å缩åå é¤åæä»¶ |
| | | }) |
| | | cache: false, // ä¸å¯ç¨æä»¶ç¼å |
| | | test: /\.(js|css|html|jpe?g|png|gif|svg)?$/i, // å缩æä»¶æ ¼å¼ |
| | | filename: "[path][base].gz[query]", // å缩åçæä»¶å |
| | | algorithm: "gzip", // 使ç¨gzipå缩 |
| | | minRatio: 0.8, // å缩æ¯ä¾ï¼å°äº 80% çæä»¶ä¸ä¼è¢«å缩 |
| | | deleteOriginalAssets: false, // å缩åå é¤åæä»¶ |
| | | }), |
| | | ], |
| | | }, |
| | | chainWebpack(config) { |
| | | config.plugins.delete('preload') // TODO: need test |
| | | config.plugins.delete('prefetch') // TODO: need test |
| | | config.plugins.delete("preload"); // TODO: need test |
| | | config.plugins.delete("prefetch"); // TODO: need test |
| | | |
| | | // set svg-sprite-loader |
| | | config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end(); |
| | | config.module |
| | | .rule('svg') |
| | | .exclude.add(resolve('src/assets/icons')) |
| | | .end() |
| | | config.module |
| | | .rule('icons') |
| | | .rule("icons") |
| | | .test(/\.svg$/) |
| | | .include.add(resolve('src/assets/icons')) |
| | | .include.add(resolve("src/assets/icons")) |
| | | .end() |
| | | .use('svg-sprite-loader') |
| | | .loader('svg-sprite-loader') |
| | | .use("svg-sprite-loader") |
| | | .loader("svg-sprite-loader") |
| | | .options({ |
| | | symbolId: 'icon-[name]' |
| | | symbolId: "icon-[name]", |
| | | }) |
| | | .end() |
| | | .end(); |
| | | |
| | | config.when(process.env.NODE_ENV !== 'development', config => { |
| | | config |
| | | .plugin('ScriptExtHtmlWebpackPlugin') |
| | | .after('html') |
| | | .use('script-ext-html-webpack-plugin', [{ |
| | | config.when(process.env.NODE_ENV !== "development", (config) => { |
| | | config |
| | | .plugin("ScriptExtHtmlWebpackPlugin") |
| | | .after("html") |
| | | .use("script-ext-html-webpack-plugin", [ |
| | | { |
| | | // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | inline: /runtime\..*\.js$/ |
| | | }]) |
| | | .end() |
| | | inline: /runtime\..*\.js$/, |
| | | }, |
| | | ]) |
| | | .end(); |
| | | |
| | | config.optimization.splitChunks({ |
| | | chunks: 'all', |
| | | cacheGroups: { |
| | | libs: { |
| | | name: 'chunk-libs', |
| | | test: /[\\/]node_modules[\\/]/, |
| | | priority: 10, |
| | | chunks: 'initial' // only package third parties that are initially dependent |
| | | }, |
| | | elementUI: { |
| | | name: 'chunk-elementUI', // split elementUI into a single package |
| | | test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm |
| | | priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app |
| | | }, |
| | | commons: { |
| | | name: 'chunk-commons', |
| | | test: resolve('src/components'), // can customize your rules |
| | | minChunks: 3, // minimum common number |
| | | priority: 5, |
| | | reuseExistingChunk: true |
| | | } |
| | | } |
| | | }) |
| | | config.optimization.runtimeChunk('single') |
| | | }) |
| | | } |
| | | } |
| | | config.optimization.splitChunks({ |
| | | chunks: "all", |
| | | cacheGroups: { |
| | | libs: { |
| | | name: "chunk-libs", |
| | | test: /[\\/]node_modules[\\/]/, |
| | | priority: 10, |
| | | chunks: "initial", // only package third parties that are initially dependent |
| | | }, |
| | | elementUI: { |
| | | name: "chunk-elementUI", // split elementUI into a single package |
| | | test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm |
| | | priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app |
| | | }, |
| | | commons: { |
| | | name: "chunk-commons", |
| | | test: resolve("src/components"), // can customize your rules |
| | | minChunks: 3, // minimum common number |
| | | priority: 5, |
| | | reuseExistingChunk: true, |
| | | }, |
| | | }, |
| | | }); |
| | | config.optimization.runtimeChunk("single"); |
| | | }); |
| | | }, |
| | | }; |