¶Ô±ÈÐÂÎļþ |
| | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 120px; |
| | | 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; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="role_manage"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">åå·¥æ°æ®å¯¹æ¯</el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">è´¦æ·åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.name" |
| | | ></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">对æ¯çè´¦æ·åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.comparisonName" |
| | | ></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç»è®°æ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="éæ©æ¥æ" value-format="yyyy-MM-dd" clearable></el-date-picker> |
| | | </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="ValueTable" :url="$api.dataReporting.selectDataComparisonDtoPageList" :componentData="componentData" :key="upIndex"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | comparisonName:null, |
| | | createTime: null, |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | | select: true, |
| | | do: [], |
| | | tagField: {} |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addDia: false, |
| | | product: [], |
| | | outPower: true |
| | | } |
| | | }, |
| | | created() { |
| | | var today = new Date(); |
| | | var yesterday = new Date(today); |
| | | yesterday.setDate(today.getDate() - 1); |
| | | var yyyy = yesterday.getFullYear(); |
| | | var mm = yesterday.getMonth() + 1; |
| | | var dd = yesterday.getDate() |
| | | if (dd < 10) { |
| | | dd = "0" + dd; |
| | | } |
| | | if (mm < 10) { |
| | | mm = "0" + mm; |
| | | } |
| | | this.componentData.entity.createTime = `${yyyy}-${mm}-${dd} 00:00:00` |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.selectDataComparisonDtoPageList() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | if(this.componentData.entity.name == null || this.componentData.entity.name == '') { |
| | | this.$message.error('è´¦æ·åç§°æ¯å¿
填项') |
| | | }else if(this.componentData.entity.comparisonName == null || this.componentData.entity.comparisonName == '') { |
| | | this.$message.error('对æ¯çè´¦æ·åç§°æ¯å¿
填项') |
| | | }else if(this.componentData.entity.createTime == null) { |
| | | this.$message.error('ç»è®°æ¶é´æ¯å¿
填项') |
| | | }else if(this.componentData.entity.name === this.componentData.entity.comparisonName) { |
| | | this.$message.error('对æ¯çè´¦æ·ä¸è½éå¤') |
| | | }else { |
| | | this.$refs['ValueTable'].selectList() |
| | | } |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | }, |
| | | selectDataComparisonDtoPageList() { |
| | | this.$axios.get(this.$api.dataReporting.selectDataComparisonDtoPageList).then(res => { |
| | | res.data.forEach(a => { |
| | | a.isClick = false |
| | | a.look = false |
| | | }) |
| | | this.menu = res.data |
| | | this.menuCopy = this.HaveJson(res.data) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |