From abba64c23543cd806ed8864a9a976408618a5f45 Mon Sep 17 00:00:00 2001 From: XiaoRuby <3114200645@qq.com> Date: 星期日, 24 九月 2023 23:15:54 +0800 Subject: [PATCH] 9-24 加班 --- src/components/view/raw-ins.vue | 391 +++++++++++++++++++++++++++---------------------------- 1 files changed, 192 insertions(+), 199 deletions(-) diff --git a/src/components/view/raw-ins.vue b/src/components/view/raw-ins.vue index 1b96168..e159492 100644 --- a/src/components/view/raw-ins.vue +++ b/src/components/view/raw-ins.vue @@ -1,221 +1,214 @@ <style scoped> - .raw_ins { - height: 100%; - } +.raw_ins { + height: 100%; +} - .raw_ins .title .el-button { - height: 32px; - border: 1px solid rgba(190, 190, 190, 0.44); - box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); - padding: 0 12px; - } +.raw_ins .title .el-button { + height: 32px; + border: 1px solid rgba(190, 190, 190, 0.44); + box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); + padding: 0 12px; +} - .raw_ins .title { - margin-bottom: 10px; - padding: 0 20px; - } +.raw_ins .title { + margin-bottom: 10px; + padding: 0 20px; +} - .choose { - padding: 21px 24px; - display: flex; - align-items: center; - background-color: #fff; - border-bottom: 3px solid rgb(245, 247, 251); - } +.choose { + padding: 21px 24px; + display: flex; + align-items: center; + background-color: #fff; + border-bottom: 3px solid rgb(245, 247, 251); +} - .choose * { - font-size: 14px; - } +.choose * { + font-size: 14px; +} - .choose .el-button { - height: 32px; - border: 1px solid rgba(190, 190, 190, 0.44); - box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); - padding: 0 12px; - } +.choose .el-button { + height: 32px; + border: 1px solid rgba(190, 190, 190, 0.44); + box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); + padding: 0 12px; +} - .thing { - width: calc(100% - 44px); - height: calc(100% - 42px - 82px - 66px); - background-color: #fff; - overflow: auto; - padding: 33px 22px; - } +.choose span { + /* span鍐呭寮哄埗涓嶆崲琛� */ + white-space: nowrap; +} - .table_do { - color: #004ea0; - cursor: pointer; - } +.thing { + width: calc(100% - 44px); + height: calc(100% - 42px - 82px - 66px); + background-color: #fff; + overflow: auto; + padding: 33px 22px; +} + +.table_do { + color: #004ea0; + cursor: pointer; +} </style> <style> - .raw_ins .thing * { - font-size: 14px; - } +.raw_ins .thing * { + font-size: 14px; +} - .raw_ins .has-gutter .el-table__cell { - background-color: #f0f1f5 !important; - color: #333; - } +.raw_ins .has-gutter .el-table__cell { + background-color: #f0f1f5 !important; + color: #333; +} - .raw_ins .has-gutter .el-table__cell .cell { - font-size: 16px; - font-weight: 500; - } +.raw_ins .has-gutter .el-table__cell .cell { + font-size: 16px; + font-weight: 500; +} - .raw_ins .cell { - color: #333; - padding-left: 17px !important; - } +.raw_ins .cell { + color: #333; + padding-left: 17px !important; +} - .raw_ins .el-table__body-wrapper { - height: 100%; - } +.raw_ins .el-table__body-wrapper { + height: 100%; +} - .raw_ins .el-table__body { - height: 100%; - } +.raw_ins .el-table__body { + height: 100%; +} </style> <template> - <div class="raw_ins"> - <div class="title"> - <el-row> - <el-col :span="12" style="line-height: 32px;">鍘熸潗鏂欐楠�</el-col> - <el-col :span="12" style="text-align: right;"> - <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" - @click="goDetail(null)">鏂板</el-button> - <el-button icon="el-icon-download">瀵煎嚭</el-button> - </el-col> - </el-row> - </div> - <div class="choose"> - <span>鏉ユ枡鏃ユ湡锛�</span> - <el-date-picker v-model="search.formTime" size="small" placeholder="璇疯緭鍏�" style="width: 13vw;margin-right: 5px;" - clearable value-format="yyyy-MM-dd"></el-date-picker> - <span>鍘熸潗鏂欑紪鐮侊細</span> - <el-input v-model="search.code" placeholder="璇疯緭鍏�" size="small" style="width: 13vw;margin-right: 5px;" - clearable></el-input> - <span>妫�娴嬬姸鎬侊細</span> - <el-select v-model="search.insState" size="small" placeholder="璇烽�夋嫨" style="width: 13vw;margin-right: 5px;"> - <el-option label="鍏ㄩ儴" :value="2"></el-option> - <el-option label="鏈娴�" :value="0"></el-option> - <el-option label="宸叉娴�" :value="1"></el-option> - </el-select> - <span>鍘熸潗鏂欏悕绉帮細</span> - <el-input v-model="search.name" size="small" placeholder="璇疯緭鍏�" style="width: 13vw;margin-right: 5px;" - clearable></el-input> - <el-button size="mini" @click="clean()"><span>閲� 缃�</span></el-button> - <el-button size="mini" type="primary" style="background: #004EA2;" @click="selectRawInspectsList()"><span>鏌� - 璇�</span></el-button> - </div> - <div class="thing"> - <el-table :data="tableData" border style="width: 100%;overflow-y: auto;min-height: calc(100% - 50px)" - max-height="calc(100% - 50px)" @selection-change="handleSelectionChange" default-expand-all - :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" row-key="id"> - <el-table-column type="selection" width="50"> </el-table-column> - <el-table-column type="index" label="搴忓彿" width="70"> - </el-table-column> - <el-table-column prop="formTime" label="鏉ユ枡鏃ユ湡"> </el-table-column> - <el-table-column prop="code" label="鍘熸潗鏂欑紪鐮�"> </el-table-column> - <el-table-column prop="name" label="鍘熸潗鏂欏悕绉�"> </el-table-column> - <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿"> - </el-table-column> - <el-table-column prop="unit" label="鍗曚綅"> </el-table-column> - <el-table-column prop="number" label="鏁伴噺"> </el-table-column> - <el-table-column prop="createTime" label="鎶ユ鏃ユ湡"> </el-table-column> - <el-table-column prop="user_name" label="鎶ユ浜�"> </el-table-column> - <el-table-column prop="createTime" label="妫�楠屾棩鏈�"> </el-table-column> - <el-table-column prop="createTime" label="妫�娴嬬姸鎬�" width="100"> - <template slot-scope="scope"> - <span style="color: #34BD66;" v-if="scope.row.ins_state == 1">宸叉娴�</span> - <span style="color: #E84738;" v-else-if="scope.row.ins_state == 0">鏈娴�</span> - </template> - </el-table-column> - <el-table-column prop="judge_state" label="鍚堟牸鐘舵��" width="100"> - <template slot-scope="scope"> - <span style="color: #34BD66;" v-if="scope.row.judge_state == 1">鍚堟牸</span> - <span style="color: #E84738;" v-else-if="scope.row.judge_state == 0">涓嶅悎鏍�</span> - </template> - </el-table-column> - <el-table-column label="鎿嶄綔" width="100"> - <template slot-scope="scope"> - <span class="table_do" @click="changeShowDetail(scope.row)">鏌ョ湅</span> - <span class="table_do">鎵撳嵃</span> - </template> - </el-table-column> - </el-table> - <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;"> - <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" - :page-sizes="[10, 15, 20, 30, 50]" :page-size="search.co" layout="total, sizes, prev, pager, next, jumper" - :total="total"> - </el-pagination> - </el-col> - </div> - </div> + <div class="raw_ins"> + <div class="title"> + <el-row> + <el-col :span="12" style="line-height: 32px;">鍘熸潗鏂欐楠�</el-col> + <el-col :span="12" style="text-align: right;"> + <el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="goDetail(null)">鏂板</el-button> + <el-button icon="el-icon-download">瀵煎嚭</el-button> + </el-col> + </el-row> + </div> + <div class="choose"> + <span>鏉ユ枡鏃ユ湡锛�</span> + <el-date-picker v-model="search.formTime" size="small" placeholder="璇疯緭鍏�" style="width: 13vw;margin-right: 5px;" clearable value-format="yyyy-MM-dd"></el-date-picker> + <span>鍘熸潗鏂欑紪鐮侊細</span> + <el-input v-model="search.code" placeholder="璇疯緭鍏�" size="small" style="width: 13vw;margin-right: 5px;" clearable></el-input> + <span>妫�娴嬬姸鎬侊細</span> + <el-select v-model="search.insState" size="small" placeholder="璇烽�夋嫨" style="width: 13vw;margin-right: 5px;"> + <el-option label="鍏ㄩ儴" :value="2"></el-option> + <el-option label="鏈娴�" :value="0"></el-option> + <el-option label="宸叉娴�" :value="1"></el-option> + </el-select> + <span>鍘熸潗鏂欏悕绉帮細</span> + <el-input v-model="search.name" size="small" placeholder="璇疯緭鍏�" style="width: 13vw;margin-right: 5px;" clearable></el-input> + <el-button size="mini" @click="clean()"><span>閲� 缃�</span></el-button> + <el-button size="mini" type="primary" style="background: #004EA2;" @click="selectRawInspectsList()"><span>鏌� 璇�</span></el-button> + </div> + <div class="thing"> + <el-table :data="tableData" border style="width: 100%;" height="calc(100% - 50px)" @selection-change="handleSelectionChange" default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" row-key="id"> + <el-table-column type="index" label="搴忓彿" width="60"> + </el-table-column> + <el-table-column prop="formTime" label="鏉ユ枡鏃ユ湡" min-width="110"> </el-table-column> + <el-table-column prop="code" label="鍘熸潗鏂欑紪鐮�" min-width="110"> </el-table-column> + <el-table-column prop="name" label="鍘熸潗鏂欏悕绉�" min-width="110"> </el-table-column> + <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" min-width="100"> + </el-table-column> + <el-table-column prop="unit" label="鍗曚綅" min-width="60"> </el-table-column> + <el-table-column prop="number" label="鏁伴噺" min-width="60"> </el-table-column> + <el-table-column prop="createTime" label="鎶ユ鏃ユ湡" min-width="110"> </el-table-column> + <el-table-column prop="user_name" label="鎶ユ浜�" min-width="80"> </el-table-column> + <el-table-column prop="createTime" label="妫�楠屾棩鏈�" min-width="110"> </el-table-column> + <el-table-column prop="createTime" label="妫�娴嬬姸鎬�" min-width="100"> + <template slot-scope="scope"> + <span style="color: #34BD66;" v-if="scope.row.ins_state == 1">宸叉娴�</span> + <span style="color: #E84738;" v-else-if="scope.row.ins_state == 0">鏈娴�</span> + </template> + </el-table-column> + <el-table-column prop="judge_state" label="鍚堟牸鐘舵��" min-width="100"> + <template slot-scope="scope"> + <span style="color: #34BD66;" v-if="scope.row.judge_state == 1">鍚堟牸</span> + <span style="color: #E84738;" v-else-if="scope.row.judge_state == 0">涓嶅悎鏍�</span> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" min-width="100" fixed="right"> + <template slot-scope="scope"> + <span class="table_do" @click="changeShowDetail(scope.row)">鏌ョ湅</span> + <span class="table_do">鎵撳嵃</span> + </template> + </el-table-column> + </el-table> + <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;"> + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" :page-sizes="[10, 15, 20, 30, 50]" :page-size="search.co" layout="total, sizes, prev, pager, next, jumper" :total="total"> + </el-pagination> + </el-col> + </div> + </div> </template> <script> - export default { - data() { - return { - search: { - formTime: "", // 鏉ユ枡鏃堕棿 - code: "", // 鍘熸潗鏂欑紪鐮� - insState: "", // 妫�娴嬬姸鎬� - name: "", // - countSize: 10, // 鏉℃暟/椤� - pageSize: 1 // 椤垫暟 - }, - total: 0, - tableData: [], - selects: [] - }; - }, - props: ["goDetail"], - mounted() { - this.selectRawInspectsList(); - }, - methods: { - handleSelectionChange(val) { - this.selects = val; - }, - handleSizeChange(val) { - this.search.countSize = val; - this.selectRawInspectsList(); - }, - handleCurrentChange(val) { - this.search.pageSize = val; - this.selectRawInspectsList(); - }, - selectRawInspectsList() { - this.$axios - .get(this.$api.url.selectRawInspectsList, { - params: this.search - }) - .then(res => { - this.tableData = res.data.row; - this.total = res.data.total; - }); - }, - clean() { - this.search = { - formTime: "", // 鏉ユ枡鏃堕棿 - code: "", // 鍘熸潗鏂欑紪鐮� - insState: "", // 妫�娴嬬姸鎬� - name: "", // - countSize: 10, // 鏉℃暟/椤� - pageSize: 1 // 椤垫暟 - }; - this.selectRawInspectsList(); - }, - changeShowDetail({ - id - }) { - this.goDetail(id); - // console.log(id) - // const res = await this.$axios.post(this.$api.url.selectRawInspectsListById,{params:{id}}) - // console.log(res) - } - } - }; +export default { + data() { + return { + search: { + formTime: "", // 鏉ユ枡鏃堕棿 + code: "", // 鍘熸潗鏂欑紪鐮� + insState: "", // 妫�娴嬬姸鎬� + name: "", // + countSize: 10, // 鏉℃暟/椤� + pageSize: 1, // 椤垫暟 + }, + total: 0, + tableData: [], + selects: [], + }; + }, + props: ["goDetail"], + mounted() { + this.selectRawInspectsList(); + }, + methods: { + handleSelectionChange(val) { + this.selects = val; + }, + handleSizeChange(val) { + this.search.countSize = val; + this.selectRawInspectsList(); + }, + handleCurrentChange(val) { + this.search.pageSize = val; + this.selectRawInspectsList(); + }, + selectRawInspectsList() { + this.$axios + .get(this.$api.url.selectRawInspectsList, { + params: this.search, + }) + .then((res) => { + this.tableData = res.data.row; + this.total = res.data.total; + }); + }, + clean() { + this.search = { + formTime: "", // 鏉ユ枡鏃堕棿 + code: "", // 鍘熸潗鏂欑紪鐮� + insState: "", // 妫�娴嬬姸鎬� + name: "", // + countSize: 10, // 鏉℃暟/椤� + pageSize: 1, // 椤垫暟 + }; + this.selectRawInspectsList(); + }, + changeShowDetail({ id }) { + this.goDetail(id); + // console.log(id) + // const res = await this.$axios.post(this.$api.url.selectRawInspectsListById,{params:{id}}) + // console.log(res) + }, + }, +}; </script> \ No newline at end of file -- Gitblit v1.9.3