| | |
| | | warehouse, |
| | | department, |
| | | report, |
| | | certification, |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | const report = { |
| | | businessStatisticsByDay: "/report/businessStatisticsByDay", //æ¯æ¥ä¸å¡ç»è®¡ |
| | | calendarWorkByWeek: "/report/calendarWorkByWeek", //é¦é¡µ-->æ¥åä»»å¡å¾ |
| | | addSchedule: "/report/addSchedule", //é¦é¡µ-->æ·»å æ¥ç¨ |
| | | ScheduleByMe: "/report/ScheduleByMe", //é¦é¡µ-->æçæ¥ç¨ |
| | | } |
| | | const certification = { |
| | | getCertificationDetail:"/certification/getCertificationDetail",//æ¥è¯¢èµè´¨æç»å表 |
| | | addCertificationDetail:"/certification/addCertificationDetail",//æ·»å èµè´¨æç»å表 |
| | | delCertificationDetail:"certification/delCertificationDetail",//å é¤èµè´¨æç»å表 |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | deep: true, |
| | | // immediate: true, |
| | | handler(val) { |
| | | this.$nextTick(() => { |
| | | this.init(); |
| | | }) |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | <style scoped> |
| | | .echart_size{ |
| | | width: 100%; |
| | | height: 500px; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | handleCascader(e,label){ |
| | | this.upData[label] = e; |
| | | }, |
| | | // æ¹éå é¤ |
| | | batchDelete(){ |
| | | if(this.multipleSelection&&this.multipleSelection.length>0){ |
| | | // this.delUrl |
| | | this.$confirm('æ¯å¦å é¤éä¸çæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.delUrl, { |
| | | id: this.multipleSelection.map(item => item.id).join(',') |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.selectList() |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | this.$message.error('è¯·éæ©è¦å é¤çæ°æ®') |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .bodys { |
| | | height: 100%; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | .table-item{ |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04); |
| | | border: 1px solid #EEEEEE; |
| | | box-sizing: border-box; |
| | | padding: 14px 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12"> |
| | | <el-radio-group v-model="radio" @input="selectorSwitch" size="medium" fill="#3A7BFA"> |
| | | <el-radio-button label="0">èµè´¨æç»</el-radio-button> |
| | | <el-radio-button label="1">èµè´¨æ»è§</el-radio-button> |
| | | </el-radio-group> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;" v-if="radio==0"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-button size="medium" icon="el-icon-delete" @click="handleDel" v-if="delPower">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-if="radio==0" class="bodys"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">èµè´¨åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="itemParameterData.entity.name" placeholder="éæ©èµè´¨åç§°" size="small" @change="refreshTable()"> |
| | | <el-option v-for="item in qualificationsList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </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> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="itemParameterTable" :url="$api.certification.getCertificationDetail" |
| | | :componentData="itemParameterData" :delUrl="$api.certification.delCertificationDetail" :key="upIndex" /> |
| | | </div> |
| | | </div> |
| | | <div class="bodys"> |
| | | <div class="search" v-if="radio==1"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">èµè´¨åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="entity.name" placeholder="éæ©èµè´¨åç§°" size="small"> |
| | | <el-option v-for="item in qualificationsList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </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> |
| | | </div> |
| | | <div class="table" v-if="radio==1" v-loading="pageLoading" @scroll="scrollFn"> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="6" v-for="(m,i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="6" :xl="6" style="margin-bottom: 16px;"> |
| | | <div class="table-item"> |
| | | <el-image style="width: 102px;height: 102px;margin-right: 20px;border-radius: 16px;" :src="javaApi+'/img/'+m.imageUrl"> |
| | | <div slot="error" class="image-error" style="width: 100px; |
| | | height: 100px; |
| | | border-radius: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <div class="table-item-right" style="flex: 1;font-size: 12px;color: #666666;"> |
| | | <p style="line-height: 30px;">èµè´¨åç§°ï¼<span style="color: #3A7BFA;">{{ m.name }}</span></p> |
| | | <p style="line-height: 30px;">æææ¶é´ï¼{{m.expireTime}}</p> |
| | | <p> |
| | | <span>ç¶æï¼</span> |
| | | <el-tag :type="m.state==0?'danger':'success'" size="small">{{ m.state==0?'失æ':'ææ' }}</el-tag> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div v-if="list.length<1&&!pageLoading&&!isLoding" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >ææ æ°æ®</div> |
| | | <div v-if="list.length>0"> |
| | | <el-button |
| | | v-if="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | ><i class="el-icon-loading" style="font-size:20px"></i |
| | | ></el-button> |
| | | <el-button |
| | | type="text" |
| | | v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >å·²ç»æ²¡ææ´å¤å¦~</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="èµè´¨æ´æ°" :visible.sync="qualificationsConnectVisible" width="400px"> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">èµè´¨åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="formData.name" placeholder="è¯·éæ©" style="width: 100%;" size="small" clearable> |
| | | <el-option |
| | | v-for="item in qualificationsList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">èµè´¨ç¼ç ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.code"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">é¢åæºæï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.organization"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">èµè´¨è¯´æï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.explanation"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">馿¬¡é¢åæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker style="width:100%" v-model="formData.firstTime" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">æè¿é¢åæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker style="width:100%" v-model="formData.recentlyTime" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">å°æé¢åæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker style="width:100%" v-model="formData.expireTime" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">èµè´¨å¾çï¼</div> |
| | | <div class="search_input"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :on-success="m=>handleSuccessUpImg(m,'imageUrl')" |
| | | accept='image/jpg,image/jpeg,image/png' |
| | | :multiple="false" |
| | | :limit="1" |
| | | :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError"> |
| | | <el-button slot="trigger" size="small" type="primary">éåå¾ç</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="margin-bottom: 16px;"> |
| | | <div class="search_label" style="width:120px">èµè´¨éä»¶ï¼</div> |
| | | <div class="search_input"> |
| | | <el-upload |
| | | ref="upload1" |
| | | :action="action" |
| | | :on-success="m=>handleSuccessUpImg(m,'fileUrl')" |
| | | accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx' :headers="headers" :multiple="false" :limit="1" :on-change="beforeUpload1" |
| | | :on-error="onError1"> |
| | | <el-button slot="trigger" size="small" type="primary">éåæä»¶</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="qualificationsConnectVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmQualifications" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | radio: '0', |
| | | itemParameterData: { |
| | | entity: { |
| | | name: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | isIndex: false, |
| | | showSelect: true, |
| | | select: true, |
| | | row: 2, |
| | | do: [{ |
| | | id: '', |
| | | font: 'éä»¶ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDownLoad', |
| | | field: [] |
| | | }], |
| | | tagField: { |
| | | state: { |
| | | select: [ |
| | | { |
| | | value: 0, |
| | | label: '失æ', |
| | | type: 'danger' |
| | | },{ |
| | | value: 1, |
| | | label: 'ææ', |
| | | type: 'success' |
| | | } |
| | | ] |
| | | }, |
| | | }, |
| | | selectField: { |
| | | inspectionItemType: { |
| | | select: [] |
| | | }, |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | itemParameterEntityCopy: {}, |
| | | upIndex: 0, |
| | | addPower: true, |
| | | delPower:true, |
| | | select: 0, |
| | | qualificationsList:[], |
| | | qualificationsConnectVisible:false, |
| | | formData:{}, |
| | | loading:false, |
| | | pageLoading:false, |
| | | isLoding: false, // å è½½ä¸ï¼loading徿 ,é»è®¤ä¸ºtrue |
| | | finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº |
| | | entity:{ |
| | | name: null, |
| | | orderBy: {field: "id", order: "asc"} |
| | | }, |
| | | currentPage: 1, // å½å页 |
| | | pageSize: 16, // ä¸é¡µ16æ¡ |
| | | total: '', |
| | | list:[], |
| | | } |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.deviceScope.uploadFile |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.itemParameterEntityCopy = this.HaveJson(this.itemParameterData.entity) |
| | | this.selectEnumByCategory() |
| | | this.getPower('0') |
| | | }, |
| | | methods: { |
| | | selectorSwitch(radio) { |
| | | if(radio === '1'){ |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | } |
| | | }, |
| | | refreshTable() { |
| | | if (this.radio === '0') { |
| | | this.$refs['itemParameterTable'].selectList() |
| | | } else { |
| | | if(this.currentPage>1){ |
| | | this.isLoding = true |
| | | }else{ |
| | | this.pageLoading = true |
| | | } |
| | | if(this.list.length==0){ |
| | | window.addEventListener("scroll", this.throttle(this.scrollFn, 20000)); |
| | | } |
| | | this.$axios.post(this.$api.certification.getCertificationDetail,{ |
| | | page: { |
| | | current: this.currentPage, |
| | | size: this.pageSize |
| | | }, |
| | | entity: this.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | if(res.code==200){ |
| | | this.total = res.data.body.total |
| | | let list = res.data.body.records; |
| | | if(list.length==0){ |
| | | this.finishLoding = true; |
| | | }else{ |
| | | if(list.length<this.pageSize){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.list = this.list.concat(list) |
| | | if(this.total==this.list.length){ |
| | | this.finishLoding = true; |
| | | } |
| | | } |
| | | } |
| | | this.pageLoading = false |
| | | this.isLoding = false; |
| | | }) |
| | | } |
| | | }, |
| | | refresh() { |
| | | if(this.radio === '0'){ |
| | | this.itemParameterData.entity = this.HaveJson(this.itemParameterEntityCopy) |
| | | this.upIndex++ |
| | | }else{ |
| | | this.finishLoding = false; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.entity={ |
| | | name: null, |
| | | orderBy: {field: "id", order: "asc"} |
| | | }; |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | | openAdd() { |
| | | // this.$refs.itemParameterTable.openAddDia(this.$api.certification.addCertificationDetail); |
| | | this.qualificationsConnectVisible = true; |
| | | this.$nextTick(()=>{ |
| | | this.$refs.upload.clearFiles() |
| | | this.$refs.upload1.clearFiles() |
| | | }) |
| | | this.formData = {}; |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "èµè´¨åç§°" |
| | | }).then(res => { |
| | | // this.itemParameterData.selectField.inspectionItemType.select = res.data |
| | | this.qualificationsList = res.data |
| | | }) |
| | | }, |
| | | handleDel(){ |
| | | this.$refs.itemParameterTable.batchDelete(); |
| | | }, |
| | | handleDownLoad(row){ |
| | | let url = row.fileUrl; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + '/img/'+ url; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | }, |
| | | handleSuccessUpImg(response,name) { |
| | | if (response.code == 200) { |
| | | this.formData[name] = response.data.url; |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | beforeUpload1(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload1.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError1(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload1.clearFiles() |
| | | }, |
| | | confirmQualifications(){ |
| | | if(!this.formData.name){ |
| | | this.$message.error('æªå¡«åèµè´¨åç§°'); |
| | | return |
| | | } |
| | | if(!this.formData.code){ |
| | | this.$message.error('æªå¡«åèµè´¨ç¼ç '); |
| | | return |
| | | } |
| | | if(!this.formData.organization){ |
| | | this.$message.error('æªå¡«åé¢åæºæ'); |
| | | return |
| | | } |
| | | if(!this.formData.expireTime){ |
| | | this.$message.error('æªå¡«åå°æé¢åæ¶é´'); |
| | | return |
| | | } |
| | | if(!this.formData.imageUrl){ |
| | | this.$message.error('æªä¸ä¼ èµè´¨å¾ç'); |
| | | return |
| | | } |
| | | if(!this.formData.fileUrl){ |
| | | this.$message.error('æªä¸ä¼ èµè´¨éä»¶'); |
| | | return |
| | | } |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.certification.addCertificationDetail, { |
| | | ...this.formData |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (res.code == 201) return |
| | | this.$message.success('å·²æäº¤') |
| | | this.refreshTable() |
| | | this.qualificationsConnectVisible = false |
| | | }) |
| | | }, |
| | | // æéåé
|
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'delCertificationDetail') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'addCertificationDetail') { |
| | | add = true |
| | | } |
| | | } |
| | | this.addPower = add |
| | | this.delPower = del |
| | | }, |
| | | // æ»å¨è§¦åºå è½½ |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //å¯è§åºå |
| | | let scrollHeight = document.body.scrollHeight; // æ»å¨ææ¡£é«åº¦ |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // å·²æ»å¨çé«åº¦ |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) { |
| | | this.currentPage = this.currentPage + 1; |
| | | this.refreshTable(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // å°è£
彿°è¿è¡èæµ |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" |
| | | accept='image/jpg,image/jpeg,image/png' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload'> |
| | | <el-button type="text" style="height:30px;paddingTop:8px">ä¸ä¼ </el-button> |
| | | <el-button type="text" style="height:30px;padding-top:8px">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | <template> |
| | | <div class="daily-main" v-loading="loading"> |
| | | <div class="daily-content" style="height:100%"> |
| | | <p style="font-size: 16px;padding:19.5px 0px">æ¯æ¥ä¸å¡ç»è®¡</p> |
| | | <!-- <p style="font-size: 16px;padding:19.5px 0px">æ¯æ¥ä¸å¡ç»è®¡</p> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥ä»»å¡æ¥æ¶</h4> |
| | |
| | | <img src="../../../static/img/daliy-0.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥ä»»å¡å®æ</h4> |
| | |
| | | <img src="../../../static/img/daliy-1.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥ä»»å¡å©ä½</h4> |
| | |
| | | <img src="../../../static/img/daliy-2.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥æ£æµè´¹ç¨</h4> |
| | |
| | | <img src="../../../static/img/daliy-3.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥æ£æµå·¥æ¶</h4> |
| | |
| | | <img src="../../../static/img/daliy-4.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="daily-card daily-head"> |
| | | <div class="daily-head-left"> |
| | | <h4>仿¥æ£æµäººå</h4> |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 30px;"> |
| | | <div class="daily-card chart-box"> |
| | | <el-row :gutter="20" style="height: calc(100% - 170px);"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 16px;height: 100%;"> |
| | | <div class="daily-card chart-box" style="height: 100%;"> |
| | | <h4>è¿10æ¥ä»»å¡æ¥æ¶é</h4> |
| | | <echart-module :id="'daily-left'" :config="chartConfig0" :datas="chartData0"></echart-module> |
| | | <echart-module :id="'daily-left'" :config="chartConfig0" :datas="chartData0" style="height: calc(100% - 32px);"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 30px;"> |
| | | <div class="daily-card chart-box"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 16px;height: 100%;"> |
| | | <div class="daily-card chart-box" style="height: 100%;"> |
| | | <h4>è¿10æ¥å®é
宿任å¡ä¸æ¥æ¶ä»»å¡å¯¹æ¯</h4> |
| | | <echart-module :id="'daily-right'" :config="chartConfig1" :datas="chartData1"></echart-module> |
| | | <echart-module :id="'daily-right'" :config="chartConfig1" :datas="chartData1" style="height: calc(100% - 32px);"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | data(){ |
| | | return{ |
| | | chartConfig0:{ |
| | | height: '435px', |
| | | height: '', |
| | | isLoading:false, |
| | | type:'line' |
| | | }, |
| | |
| | | ] |
| | | }, |
| | | chartConfig1:{ |
| | | height: '435px', |
| | | height: '', |
| | | isLoading:false, |
| | | type:'bar' |
| | | }, |
| | |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | .daily-content{ |
| | | padding: 20px 0; |
| | | box-sizing: border-box; |
| | | } |
| | | .daily-card{ |
| | | width: 100%; |
| | | background: #FFFFFF; |
| | |
| | | color: #202224; |
| | | font-size: 16px; |
| | | font-weight: 400; |
| | | margin-bottom: 20px; |
| | | margin-bottom: 16px; |
| | | opacity: 0.8; |
| | | } |
| | | |
| | |
| | | font-weight: bold; |
| | | font-size: 28px; |
| | | display: inline-block; |
| | | margin-bottom: 30px; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .daily-head-left .daily-head-left-info{ |
| | |
| | | } |
| | | |
| | | .chart-box{ |
| | | padding: 30px 24px; |
| | | padding: 16px 24px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="inspection-main"> |
| | | <div class="inspection-content" style="height:100%"> |
| | | <p style="font-size: 16px;padding:19.5px 0px">æ£æµé¡¹ç®ç»è®¡</p> |
| | | <!-- <p style="font-size: 16px;padding:19.5px 0px">æ£æµé¡¹ç®ç»è®¡</p> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head"> |
| | | <div class="inspection-head-left"> |
| | | <h4>仿¥é¡¹ç®æ¥æ¶</h4> |
| | |
| | | <img src="../../../static/img/daliy-0.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head"> |
| | | <div class="inspection-head-left"> |
| | | <h4>仿¥é¡¹ç®å®æ</h4> |
| | |
| | | <img src="../../../static/img/daliy-1.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head"> |
| | | <div class="inspection-head-left"> |
| | | <h4>仿¥é¡¹ç®å©ä½</h4> |
| | |
| | | <img src="../../../static/img/daliy-2.svg" alt="" srcset=""> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head" style="flex-direction: column;padding-bottom: 5px;"> |
| | | <h4 style="margin-bottom: 5px;">仿¥é¡¹ç®åæ ¼ç</h4> |
| | | <echart-module :id="'inspection-qualified'" :config="chartConfig2" :datas="chartData2" style="align-self: center;"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head" style="flex-direction: column;padding-bottom: 5px;"> |
| | | <h4 style="margin-bottom: 5px;">仿¥é¡¹ç®å®æç</h4> |
| | | <echart-module :id="'inspection-complete'" :config="chartConfig3" :datas="chartData3" style="align-self: center;"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 30px;"> |
| | | <el-col :xs="12" :sm="8" :md="6" :lg="4" :xl="4" style="margin-bottom: 16px;"> |
| | | <div class="inspection-card inspection-head" style="flex-direction: column;padding-bottom: 5px;"> |
| | | <h4 style="margin-bottom: 5px;">仿¥é¡¹ç®å»¶æç</h4> |
| | | <echart-module :id="'inspection-extension'" :config="chartConfig4" :datas="chartData4" style="align-self: center;"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 30px;"> |
| | | <div class="inspection-card chart-box"> |
| | | <el-row :gutter="20" style="height: calc(100% - 170px);"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 16px; height: 100%;"> |
| | | <div class="inspection-card chart-box" style="height: 100%;"> |
| | | <h4>è¿10æ¥é¡¹ç®æ¥æ¶é</h4> |
| | | <echart-module :id="'inspection-left'" :config="chartConfig0" :datas="chartData0"></echart-module> |
| | | <echart-module :id="'inspection-left'" :config="chartConfig0" :datas="chartData0" style="height: calc(100% - 32px);"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 30px;"> |
| | | <div class="inspection-card chart-box"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 16px;height: 100%;"> |
| | | <div class="inspection-card chart-box" style="height: 100%;"> |
| | | <h4>è¿10æ¥å®é
宿项ç®ä¸æ¥æ¶é¡¹ç®å¯¹æ¯</h4> |
| | | <echart-module :id="'inspection-right'" :config="chartConfig1" :datas="chartData1"></echart-module> |
| | | <echart-module :id="'inspection-right'" :config="chartConfig1" :datas="chartData1" style="height: calc(100% - 32px);"></echart-module> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | data(){ |
| | | return{ |
| | | chartConfig0:{ |
| | | height: '435px', |
| | | height: '', |
| | | isLoading:true, |
| | | type:'line' |
| | | }, |
| | |
| | | ] |
| | | }, |
| | | chartConfig1:{ |
| | | height: '435px', |
| | | height: '', |
| | | isLoading:true, |
| | | type:'bar' |
| | | }, |
| | |
| | | ] |
| | | }, |
| | | chartConfig2:{ |
| | | height: '118px', |
| | | height: '103px', |
| | | width:'140px', |
| | | isLoading:true, |
| | | type:'pie' |
| | |
| | | ] |
| | | }, |
| | | chartConfig3:{ |
| | | height: '118px', |
| | | height: '103px', |
| | | width:'140px', |
| | | isLoading:true, |
| | | type:'pie' |
| | |
| | | ] |
| | | }, |
| | | chartConfig4:{ |
| | | height: '118px', |
| | | height: '103px', |
| | | width:'140px', |
| | | isLoading:true, |
| | | type:'pie' |
| | |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | .inspection-content{ |
| | | padding: 20px 0; |
| | | box-sizing: border-box; |
| | | } |
| | | .inspection-card{ |
| | | width: 100%; |
| | | background: #FFFFFF; |
| | |
| | | font-weight: bold; |
| | | font-size: 28px; |
| | | display: inline-block; |
| | | margin-bottom: 30px; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .inspection-head-left .inspection-head-left-info{ |
| | |
| | | } |
| | | |
| | | .chart-box{ |
| | | padding: 30px 24px; |
| | | padding: 16px 24px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | width: 100%; |
| | | height: calc(100% - 50px); |
| | | overflow-y: auto; |
| | | padding: 25px 0; |
| | | padding: 25px 0 10px; |
| | | } |
| | | |
| | | .left-1 { |
| | |
| | | } |
| | | |
| | | .right-1{ |
| | | padding: 14px 10px 4px; |
| | | padding: 10px 10px 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | |
| | | } |
| | | |
| | | .right-2{ |
| | | padding: 13px 20px; |
| | | padding: 13px 14px 8px; |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | |
| | | .list2-item{ |
| | | line-height: 22px; |
| | | display: flex; |
| | | margin-bottom: 13px; |
| | | margin-bottom: 12px; |
| | | font-size: 14px; |
| | | } |
| | | .right-3{ |
| | | } |
| | | .right-3-tab{ |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 16px; |
| | | margin-bottom: 12px; |
| | | } |
| | | .tab-item{ |
| | | width: 50%; |
| | | box-sizing: border-box; |
| | | text-align: center; |
| | | padding: 16px 0; |
| | | padding: 14px 0; |
| | | font-size: 20px; |
| | | background: #F5F7FB; |
| | | color: #333333; |
| | |
| | | color: #FF3838; |
| | | } |
| | | .right-3-list{ |
| | | padding: 0 12px 16px; |
| | | padding: 0 12px 8px; |
| | | box-sizing: border-box; |
| | | height: 390px; |
| | | overflow-y: auto; |
| | | } |
| | | .list3-item{ |
| | | padding: 6px 4px; |
| | |
| | | font-size: 14px; |
| | | } |
| | | .left-2{ |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 16px; |
| | | display: grid; |
| | | grid-template-columns: repeat(7, 1fr); |
| | | height: 777px; |
| | | } |
| | | .left-2-item{ |
| | | width: 14.1%; |
| | | border-right: 1px solid #F1F1F1; |
| | | } |
| | | .left-2-item:nth-last-child(1){ |
| | |
| | | .left-item-body{ |
| | | box-sizing: border-box; |
| | | padding: 5px; |
| | | max-height: 711px; |
| | | height: 693px; |
| | | overflow-y: auto; |
| | | } |
| | | .body-item{ |
| | |
| | | border-radius: 16px; |
| | | overflow: hidden; |
| | | margin-bottom: 8px; |
| | | } |
| | | .body-item.color0{ |
| | | background: #70A090; |
| | | } |
| | | .body-item.color1{ |
| | | background: #EBD476; |
| | | } |
| | | .body-item.color2{ |
| | | background: #FF3838; |
| | | } |
| | | .body-item>div{ |
| | | height: calc(100% - 16px); |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="left-2 card"> |
| | | <div class="left-2-item" v-for="(item,index) in 7" :key="index"> |
| | | <div class="left-2 card" v-loading="workLoading"> |
| | | <div class="left-2-item" v-for="(item,index) in workDay" :key="index"> |
| | | <div class="left-item-title"> |
| | | <span style="font-size: 18px;">25</span> |
| | | <span style="font-size: 14px;color: #999999;">ææå</span> |
| | | <span style="font-size: 18px;">{{ item }}</span> |
| | | <span style="font-size: 14px;color: #999999;">{{ weekdays[index] }}</span> |
| | | </div> |
| | | <div class="left-item-body"> |
| | | <div class="body-item" v-for="(m,i) in 8" :key="i"> |
| | | <div class="body-item" v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}"> |
| | | <div> |
| | | <span style="font-size: 12px;margin-bottom: 17px;">å§æè®¢åWT20230101 -001æ£æµ</span> |
| | | <el-image style="height: 24px;width: 24px;border-radius: 50%;"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> |
| | | </el-image> |
| | | <span style="font-size: 12px;margin-bottom: 17px;">{{ m.text }}</span> |
| | | <span style="display: inline-block;height: 24px;width: 24px;border-radius: 50%;line-height: 24px;text-align: center;background: #C0C4CC;color: #fff;">{{ m.name.charAt(0) }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | </el-calendar> |
| | | </div> |
| | | <div class="right-2-list" style="width: 49%;"> |
| | | <div class="list2-item" v-for="(m,i) in 5" :key="i"> |
| | | <span>14:00</span> |
| | | <el-tooltip style="margin-left: 10px;" effect="dark" content="åå LIMSç³»ç»å¹è®ä¼è®®ï¼å¹¶ç¾ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿" placement="top"> |
| | | <p class="ellipsis-multiline" >åå LIMSç³»ç»å¹è®ä¼è®®ï¼å¹¶ç¾ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿ä¸çº¿</p> |
| | | <div class="right-2-list" style="width: 49%;height: 286px;" v-loading="scheduleLoading"> |
| | | <div class="list2-item" v-for="(m,i) in listScheduleByMe" :key="i"> |
| | | <span>{{ m.scheduleTimes }}</span> |
| | | <el-tooltip style="margin-left: 10px;" effect="dark" :content="m.text" placement="top"> |
| | | <p class="ellipsis-multiline" >{{ m.text }}</p> |
| | | </el-tooltip> |
| | | </div> |
| | | <span style="color:rgb(153, 153, 153);font-size: 12px;text-align: center;margin: 120px 0;display: inline-block;width: 100%;" v-if="listScheduleByMe.length==0">ææ </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <p>设å¤å°ææé</p> |
| | | </div> |
| | | <div class="list3-item-info"> |
| | | <p>ç¼å·<span style="color:#3A7BFA;"> SB20240101-001 </span>ç设å¤å°äº2023-09-09 11:11:11è¿æ</p> |
| | | <p style="width: 73%;-webkit-line-clamp: 1;" class="ellipsis-multiline">ç¼å·<span style="color:#3A7BFA;"> SB20240101-001 </span>ç设å¤å°äº2023-09-09 11:11:11è¿æ</p> |
| | | <p>2023-09-09 09:09:09</p> |
| | | </div> |
| | | </div> |
| | |
| | | type="datetime" |
| | | placeholder="éæ©æ¥ææ¶é´" |
| | | size="small" |
| | | style="width:100%"> |
| | | value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">å
容ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="query.content" size="small" placeholder="请è¾å
¥å
容"></el-input> |
| | | <el-input v-model="query.text" size="small" placeholder="请è¾å
¥å
容"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | dialogVisible:false, |
| | | query:{ |
| | | time:'', |
| | | content:'' |
| | | text:'' |
| | | }, |
| | | loading:false |
| | | loading:false, |
| | | workLoading:false, |
| | | workList:[], |
| | | workDay:[], |
| | | weekdays:[], |
| | | listScheduleByMe:[], |
| | | scheduleLoading:false, |
| | | } |
| | | }, |
| | | watch:{ |
| | | calendarValue(val){ |
| | | this.getScheduleByMe() |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.user = JSON.parse(localStorage.getItem('user')) |
| | | this.nowTime() |
| | | // this.getDataList() |
| | | setInterval(() => { |
| | | this.nowTime() |
| | | }, 1000) |
| | | this.init(); |
| | | this.weekdays = this.getWeekdaysForNextWeek() |
| | | this.getScheduleByMe() |
| | | }, |
| | | methods: { |
| | | nowTime() { |
| | |
| | | m = "0" + m; |
| | | } |
| | | this.now = y + "-" + m + "-" + d + " " + h + ":" + min + ":" + s; |
| | | }, |
| | | getDataList() { |
| | | this.$axios.get(this.$api.dataReporting.getDataList).then(res => { |
| | | this.data = res.data |
| | | }) |
| | | }, |
| | | nextMonth(value) { |
| | | let year = this.calendarValue.getFullYear();// å½å年份 |
| | |
| | | this.dialogVisible = false; |
| | | this.query = { |
| | | time:'', |
| | | content:'' |
| | | text:'' |
| | | } |
| | | }, |
| | | submit(){ |
| | |
| | | this.$message.error('æ¶é´æªå¡«å') |
| | | return |
| | | } |
| | | if(!this.query.content){ |
| | | if(!this.query.text){ |
| | | this.$message.error('å
容æªå¡«å') |
| | | return |
| | | } |
| | | this.loading = true; |
| | | this.$axios.post(this.$api.report.addSchedule, this.query).then(res => { |
| | | this.loading = false; |
| | | if (res.code == 201) { |
| | | this.$message.error('æä½å¤±è´¥') |
| | | return |
| | | } |
| | | this.$message.success('ä¿åæå') |
| | | this.handleCancel() |
| | | this.getScheduleByMe() |
| | | }) |
| | | }, |
| | | init(){ |
| | | this.workLoading = true; |
| | | this.$axios.get(this.$api.report.calendarWorkByWeek).then(res => { |
| | | if (res.code == 201) return |
| | | this.workLoading = false; |
| | | this.workList = []; |
| | | for(let i=0;i<7;i++){ |
| | | this.workList.push(res.data[`work${i}`]) |
| | | } |
| | | this.workDay = res.data.weekDays.map(m=>{ |
| | | return m[2] |
| | | }) |
| | | }) |
| | | }, |
| | | getWeekdaysForNextWeek() { |
| | | let weekdays = []; |
| | | for (let i = 0; i < 7; i++) { |
| | | let date = new Date(); |
| | | date.setDate(date.getDate() + i); // ä»å¤©ä¹åçæ¥å |
| | | let day = date.getDay(); // 0-6 ä»£è¡¨æææ¥å°ææå
|
| | | weekdays.push(day); |
| | | } |
| | | weekdays = weekdays.map(m=>{ |
| | | let day ='' |
| | | switch (m) { |
| | | case 0: |
| | | day = 'ææå¤©' |
| | | break; |
| | | case 1: |
| | | day = 'ææä¸' |
| | | break; |
| | | case 2: |
| | | day = 'ææäº' |
| | | break; |
| | | case 3: |
| | | day = 'ææä¸' |
| | | break; |
| | | case 4: |
| | | day = 'ææå' |
| | | break; |
| | | case 5: |
| | | day = 'ææäº' |
| | | break; |
| | | case 6: |
| | | day = 'ææå
' |
| | | break; |
| | | } |
| | | return day |
| | | }) |
| | | return weekdays; |
| | | }, |
| | | getScheduleByMe(){ |
| | | this.scheduleLoading = true; |
| | | this.$axios.post(this.$api.report.ScheduleByMe, { |
| | | date:getYearAndMonthAndDays(this.calendarValue) |
| | | }).then(res => { |
| | | this.loading = false; |
| | | this.scheduleLoading = false; |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.listScheduleByMe = res.data.map(m=>{ |
| | | if(m.scheduleTime){ |
| | | let time = m.scheduleTime.split(' ')[1].split(':') |
| | | m.scheduleTimes = time[0] + ':' + time[1] |
| | | }else{ |
| | | m.scheduleTimes = '' |
| | | } |
| | | return m |
| | | }) |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | /** |
| | | * è·åå¹´ææ¥ |
| | | */ |
| | | export function getYearAndMonthAndDays() { |
| | | const date = new Date() |
| | | export function getYearAndMonthAndDays(date=new Date()) { |
| | | let year = date.getFullYear() |
| | | let month = date.getMonth() + 1 |
| | | if (month < 10) { |
| | |
| | | }, |
| | | }, |
| | | grid: { |
| | | top: '5%', |
| | | left: '7%', |
| | | top: '25px', |
| | | left: '40px', |
| | | right: '3%', |
| | | bottom: '7%', |
| | | bottom: '40px', |
| | | // containLabel: true |
| | | }, |
| | | legend: { |
| | | show: true, |
| | | orient: 'horizontal', |
| | | y:-5, |
| | | y:-2, |
| | | right:15, |
| | | itemWidth: 12, |
| | | itemHeight: 12, |
| | |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgba(43,48,52, 0.4)', |
| | | margin: 30, |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | |
| | | }, |
| | | }, |
| | | grid: { |
| | | top: '5%', |
| | | left: '7%', |
| | | right: '2%', |
| | | bottom: '7%', |
| | | top: '25px', |
| | | left: '40px', |
| | | right: '3%', |
| | | bottom: '40px', |
| | | // containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | |
| | | }, |
| | | axisLabel: { |
| | | color: 'rgba(43,48,52, 0.4)', |
| | | margin: 30, |
| | | margin: 20, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | |
| | | }, { |
| | | v: "å®éªå®¤èµè´¨", |
| | | i: "font icon-erjidaohang", |
| | | u: "", |
| | | u: "a5-laboratory-qualifications", |
| | | g: "Cè½åèå´åèµè´¨", |
| | | p: "" |
| | | }, { |