| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="年份:" style="margin-left: 20px"> |
| | | <el-date-picker |
| | | v-model="data.queryParams.year" |
| | | type="year" |
| | | value-format="YYYY" |
| | | placeholder="请选择年份" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-if="data.isAdmin"> |
| | | <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button> |
| | | <el-button plain @click="reset">重置</el-button> |
| | |
| | | |
| | | onMounted(() => { |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | console.log("userInfo",userInfo) |
| | | data.queryParams.year = new Date().getFullYear().toString() |
| | | data.isAdmin = userInfo.userType === 0; |
| | | if(data.isAdmin){ |
| | | data.queryParams.companyId = null |
| | |
| | | function reset() { |
| | | if(data.isAdmin){ |
| | | data.queryParams = { |
| | | companyId: '', |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | year: '', |
| | | companyId: null, |
| | | year: new Date().getFullYear().toString(), |
| | | type: '' |
| | | } |
| | | choosedData.value = [] |
| | |
| | | companyId: data.queryParams.companyId, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | year: '', |
| | | year: new Date().getFullYear().toString(), |
| | | type: '' |
| | | } |
| | | } |