¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="ç¼å·" prop="quarterNo" v-show="tabIndex === 0"> |
| | | <el-input v-model="entity.quarterNo" clearable placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button v-if="tabIndex === 1" size="small" type="primary" @click="yearSample('add')">å¹´åº¦æ½æ ·</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="table"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in tabList" :key="i" :class="{active:i===tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> |
| | | </ul> |
| | | <!--å£åº¦--> |
| | | <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <!--年度--> |
| | | <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" |
| | | @pagination="pagination1" :height="'calc(100vh - 290px)'" |
| | | key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> |
| | | </div> |
| | | </div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="yearSampleDia" title="å¹´åº¦æ½æ ·" width="70%" |
| | | @close="closeYearSampleDia"> |
| | | <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> |
| | | <div style="width: 30%;display: flex;align-items: center;" > |
| | | <el-input v-if="operationType !=='view'" v-model="currentYear" size="small"/> |
| | | <span v-if="operationType ==='view'" style="width: 160px;font-size: 18px;font-weight: 600">{{currentYear}}</span> |
| | | </div> |
| | | <div v-if="operationType !== 'view'"> |
| | | <el-button size="small" type="primary" @click="addQuarter">æ·»å </el-button> |
| | | <el-button size="small" type="danger" @click="clearTable">æ¸
空</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-table :data="yearItems" border height="450" style="width: 100%"> |
| | | <el-table-column label="ç±»å«" prop="yearType" width="240"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.yearType" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.yearType}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="1" prop="january" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.january" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.january}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="2" prop="february" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.february" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.february}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="3" prop="march" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.march" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.march}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="4" prop="april" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.april" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.april}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="5" prop="may" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.may" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.may}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="6" prop="june" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.june" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.june}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="7" prop="july" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.july" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.july}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="8" prop="august" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.august" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.august}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="9" prop="september" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.september" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.september}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="10" prop="october" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.october" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.october}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="11" prop="november" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.november" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.november}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="12" prop="december" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.december" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.december}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'view'" fixed="right" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="deleteScope(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin-top: 10px"> |
| | | <span style="width: 70px">注æäºé¡¹ï¼</span> |
| | | <el-input v-model="yearSampleForm.tableRemark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin-top: 10px"> |
| | | <span style="width: 70px">夿³¨ï¼</span> |
| | | <el-input v-model="yearSampleForm.remark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> |
| | | </div> |
| | | <div v-if="operationType !== 'add'"> |
| | | <el-form ref="form" :model="editYearFormRow" label-width="70px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å¶äººï¼"> |
| | | <el-select v-model="editYearFormRow.writeUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼ç¾äººï¼"> |
| | | <el-select v-model="editYearFormRow.countersignUser" :disabled="operationType !=='edit'" multiple placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸äººï¼"> |
| | | <el-select v-model="editYearFormRow.examineUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¹å人ï¼"> |
| | | <el-select v-model="editYearFormRow.ratifyUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearSampleDia">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'view'" type="primary" @click="handleSample">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <add-quarter-item ref="addQuarterItem"></add-quarter-item> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddQuarterItem from "./components/addQuarterItem.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addSpotCheckYear, |
| | | deleteQuarter, deleteSpotCheckYear, |
| | | finalReportQuarter, |
| | | finalReportSpotCheckYear, |
| | | getQuarterPage, getSpotCheckYear, getSpotCheckYearPage, updateSpotCheckYear |
| | | } from "@/api/business/productSamplingInfo"; |
| | | import {selectUserCondition} from "@/api/performance/class"; |
| | | |
| | | export default { |
| | | name: "b1-product-sampling-info", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable, AddQuarterItem}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | upIndex: 0, |
| | | tabIndex: 0, |
| | | tabList: [ |
| | | { |
| | | label: 'å£åº¦', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '年度', |
| | | value: 1 |
| | | }, |
| | | ], |
| | | entity: { |
| | | quarterNo: null, |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'ç¼å·', prop: 'quarterNo'}, |
| | | {label: '夿³¨', prop: 'remark'}, |
| | | {label: 'å建人', prop: 'createUserName'}, |
| | | {label: 'å建æ¶é´', prop: 'createTime'}, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editForm(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewQuarterInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.deleteQuarterInfo(row); |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | { label: 'åç§°', prop: 'yearHead' }, |
| | | { label: 'å建人', prop: 'createUserName' }, |
| | | { label: 'å建æ¶é´', prop: 'createTime' }, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editYearForm(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewYearInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.download(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.deleteYearInfo(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page1: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | yearSampleDia: false, // å¹´åº¦æ½æ · |
| | | yearSampleForm: { |
| | | tableRemark: '', |
| | | remark: '' |
| | | }, |
| | | yearItems: [], |
| | | currentYear: '', |
| | | operationType: '', |
| | | userList: [], |
| | | yearRow: {}, |
| | | editYearFormRow: { |
| | | yearId: '', |
| | | writeUser: '', // ç¼å¶äºº |
| | | countersignUser: null, // ä¼ç¾äºº |
| | | examineUser: '', // å®¡æ ¸äºº |
| | | ratifyUser: '', // æ¹å人 |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢åè° |
| | | refreshTable(e) { |
| | | if (this.tabIndex === 0) { |
| | | this.getQuarterPageList() |
| | | } else if (this.tabIndex === 1) { |
| | | this.getSpotCheckYearPageList() |
| | | } |
| | | }, |
| | | getQuarterPageList () { |
| | | this.tableLoading = true |
| | | getQuarterPage({ |
| | | ...this.page,...this.entity |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | this.page.total = res.data.total |
| | | this.tableData = res.data.records |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | getSpotCheckYearPageList () { |
| | | this.tableLoading1 = true |
| | | getSpotCheckYearPage({ |
| | | ...this.page1 |
| | | }).then(res => { |
| | | this.tableLoading1 = false |
| | | this.page1.total = res.data.total |
| | | this.tableData1 = res.data.records |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable() |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination1 (page) { |
| | | this.page1.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | // ç¼è¾å£åº¦æ½æ · |
| | | editForm (row) { |
| | | this.$refs.addQuarterItem.openDia(row, 'edit') |
| | | }, |
| | | // æ¥çå£åº¦æ½æ · |
| | | viewQuarterInfo (row) { |
| | | this.$refs.addQuarterItem.openDia(row, 'view') |
| | | }, |
| | | // å é¤å£åº¦æ½æ · |
| | | deleteQuarterInfo (row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteQuarter({quarterId: row.quarterId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | let randomNum = Math.random(); |
| | | finalReportQuarter({quarterId: row.quarterId, random: randomNum}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'å£åº¦æ½æ ·ä¿¡æ¯å¯¼åº.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // 年度ä¸è½½ |
| | | download(row) { |
| | | finalReportSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, row.yearHead + '.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // å é¤å¹´åº¦æ½æ · |
| | | deleteYearInfo (row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // æ¥ç年度详æ
|
| | | viewYearInfo (row) { |
| | | this.operationType = 'view' |
| | | this.getUserList() |
| | | this.yearSampleDia = true |
| | | this.yearRow = row |
| | | getSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.currentYear = res.data.yearHead |
| | | this.yearItems = res.data.yearItems |
| | | this.yearSampleForm.tableRemark = res.data.tableRemark |
| | | this.yearSampleForm.remark = res.data.remark |
| | | this.editYearFormRow.yearId = res.data.yearId |
| | | this.editYearFormRow.writeUser = res.data.writeUser |
| | | this.editYearFormRow.examineUser = res.data.examineUser |
| | | this.editYearFormRow.ratifyUser = res.data.ratifyUser |
| | | if (res.data.countersignUser) { |
| | | this.editYearFormRow.countersignUser = res.data.countersignUser.split(",").map(Number) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // ç¼è¾å¹´åº¦æ½æ · |
| | | editYearForm (row) { |
| | | this.operationType = 'edit' |
| | | this.getUserList() |
| | | this.yearSampleDia = true |
| | | getSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.currentYear = res.data.yearHead |
| | | this.yearItems = res.data.yearItems |
| | | this.yearSampleForm.tableRemark = res.data.tableRemark |
| | | this.yearSampleForm.remark = res.data.remark |
| | | this.editYearFormRow.yearId = res.data.yearId |
| | | this.editYearFormRow.writeUser = res.data.writeUser |
| | | this.editYearFormRow.examineUser = res.data.examineUser |
| | | this.editYearFormRow.ratifyUser = res.data.ratifyUser |
| | | if (res.data.countersignUser) { |
| | | this.editYearFormRow.countersignUser = res.data.countersignUser.split(",").map(Number) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤å¹´åº¦è®¡å |
| | | handleSample () { |
| | | if (this.operationType === 'add') { |
| | | this.yearSampleForm.yearItems = JSON.parse(JSON.stringify(this.yearItems)) |
| | | this.yearSampleForm.yearHead = this.currentYear |
| | | addSpotCheckYear(this.yearSampleForm).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.yearSampleForm = {} |
| | | this.yearItems = [] |
| | | this.closeYearSampleDia() |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } else { |
| | | const params = {...this.editYearFormRow} |
| | | if (params.countersignUser != null) { |
| | | params.countersignUser = params.countersignUser.join(',') |
| | | } |
| | | params.yearItems = JSON.parse(JSON.stringify(this.yearItems)) |
| | | params.tableRemark = this.yearSampleForm.tableRemark |
| | | params.remark = this.yearSampleForm.remark |
| | | updateSpotCheckYear(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.yearSampleForm = {} |
| | | this.editYearFormRow = { |
| | | yearId: '', |
| | | writeUser: '', // ç¼å¶äºº |
| | | countersignUser: [], // ä¼ç¾äºº |
| | | examineUser: '', // å®¡æ ¸äºº |
| | | ratifyUser: '', // æ¹å人 |
| | | } |
| | | this.yearItems = [] |
| | | this.closeYearSampleDia() |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | yearSample (type) { |
| | | this.operationType = type |
| | | const currentDate = new Date(); |
| | | this.yearSampleDia = true |
| | | this.currentYear = currentDate.getFullYear() + 'å¹´å¹´åº¦æ½æ£è®¡å' |
| | | }, |
| | | // æ·»å 年度计å |
| | | addQuarter () { |
| | | this.yearItems.push({}) |
| | | }, |
| | | // æ¸
ç©ºæ½æ ·è®¡å |
| | | clearTable () { |
| | | this.yearItems = [] |
| | | }, |
| | | // æå¨å é¤ |
| | | deleteScope (index) { |
| | | this.yearItems.splice(index, 1) |
| | | }, |
| | | // 忢ä¸åtabè¡¨æ ¼ |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | if (this.tabIndex === 0) { |
| | | this.componentData.entity.quarterNo = this.entity.quarterNo |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | closeYearSampleDia () { |
| | | this.yearSampleForm = { |
| | | tableRemark: '', |
| | | remark: '' |
| | | } |
| | | this.yearItems = [] |
| | | this.yearSampleDia = false |
| | | }, |
| | | getStyle(){ |
| | | return 'height: calc(100% - '+'44'+'px)' |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | margin-top: 0; |
| | | padding-left: 0; |
| | | } |
| | | |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #EEEEEE; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(2) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3A7BFA; |
| | | color: #3A7BFA; |
| | | } |
| | | </style> |