From 445007f79c0162c3cd88ace0d3608fd6dbf0c719 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 21 三月 2025 14:09:50 +0800 Subject: [PATCH] 工时管理-样式优化 --- src/views/standard/model/index.vue | 144 ++++++++++------------------------------------- 1 files changed, 32 insertions(+), 112 deletions(-) diff --git a/src/views/standard/model/index.vue b/src/views/standard/model/index.vue index 1d9f42c..5736379 100644 --- a/src/views/standard/model/index.vue +++ b/src/views/standard/model/index.vue @@ -1,80 +1,33 @@ <template> - <div class="standard-template"> + <div class="capacity-scope"> <div class="search"> - <div class="search_thing"> - <div class="search_label">妯℃澘鍚嶇О锛�</div> - <div class="search_input"> - <el-input - v-model="queryParams.name" - clearable - placeholder="璇疯緭鍏�" - size="small" - @keyup.enter.native="refreshTable()" - ></el-input> - </div> + <div> + <el-form :model="queryParams" ref="queryParams" size="small" :inline="true"> + <el-form-item label="妯℃澘鍚嶇О" prop="name"> + <el-input v-model="queryParams.name" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button> + <el-button size="mini" @click="refresh">閲嶇疆</el-button> + </el-form-item> + </el-form> </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 class="btn"> - <el-button - v-if="checkPermi(['standard:model:add'])" - size="small" - type="primary" - @click="openAdd" - >鏂板</el-button - > - <!-- <el-button - v-if="checkPermi(['standard:model:copy'])" - size="small" - @click="copyTemplate" - >澶嶅埗妯$増</el-button - > --> + <div> + <el-button v-if="checkPermi(['standard:model:add'])" size="small" type="primary" @click="openAdd">鏂板</el-button> </div> </div> - <lims-table - :tableData="tableData" - :column="column" - :page="page" - :tableLoading="tableLoading" - :height="'calc(100vh - 250px)'" - style="padding: 20px; padding-top: 0" - @pagination="pagination" - ></lims-table> - <el-dialog - :before-close="isClose" - :close-on-click-modal="false" - :close-on-press-escape="false" - :visible.sync="isShow" - title="妯℃澘缂栧埗" - width="85%" - > + <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" + :height="'calc(100vh - 250px)'" @pagination="pagination"></lims-table> + <el-dialog :before-close="isClose" :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="isShow" title="妯℃澘缂栧埗" width="85%"> <div v-if="isShow" style="width: 100%; height: 82vh; overflow: auto"> - <Excel - v-loading="loading" - :data="row.thing" - :execlTitle="row.name" - ></Excel> + <Excel v-loading="loading" :data="row.thing" :execlTitle="row.name"></Excel> </div> </el-dialog> - <el-dialog - :before-close="closeCopyTem" - :close-on-click-modal="false" - :close-on-press-escape="false" - :visible.sync="isShowCopyTem" - :title="title" - width="35%" - > - <el-form - ref="copyForm" - :model="copyForm" - :rules="copyFormRules" - label-position="right" - label-width="80px" - > + <el-dialog :before-close="closeCopyTem" :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="isShowCopyTem" :title="title" width="35%" :modal-append-to-body="false"> + <el-form ref="copyForm" :model="copyForm" :rules="copyFormRules" label-position="right" label-width="80px"> <el-form-item label="妯$増缂栧彿" prop="number"> <el-input v-model="copyForm.number" clearable size="small"></el-input> </el-form-item> @@ -87,12 +40,7 @@ </el-form> <span slot="footer" class="dialog-footer"> <el-button @click="closeCopyTem">鍙� 娑�</el-button> - <el-button - :loading="submitCopyInfoLoading" - type="primary" - @click="submitCopyInfo" - >纭� 瀹�</el-button - > + <el-button :loading="submitCopyInfoLoading" type="primary" @click="submitCopyInfo">纭� 瀹�</el-button> </span> </el-dialog> </div> @@ -110,6 +58,7 @@ getEditTemplatePreparation, } from "@/api/standard/model"; export default { + name: 'Model', components: { Excel, limsTable, @@ -145,12 +94,11 @@ { label: "妯℃澘鍚嶇О", prop: "name" }, { label: "澶囨敞", prop: "remark" }, { label: "鍒涘缓鐢ㄦ埛", prop: "createUserName" }, - { label: "鍒涘缓鏃堕棿", prop: "createTime" }, + { label: "鍒涘缓鏃堕棿", prop: "createTime", width: "160" }, { label: "鏇存柊鐢ㄦ埛", prop: "updateUserName" }, - { label: "淇敼鏃堕棿", prop: "updateTime" }, + { label: "淇敼鏃堕棿", prop: "updateTime", width: "160" }, { dataType: "action", - fixed: "right", label: "鎿嶄綔", operation: [ { @@ -158,7 +106,7 @@ type: "text", clickFun: (row) => { this.title = "缂栬緫"; - this.copyForm = row; + this.copyForm = this.HaveJson(row); this.isShowCopyTem = true; }, showHide: (row) => { @@ -272,7 +220,6 @@ delete params.id; addStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("鏂板鎴愬姛"); @@ -287,7 +234,6 @@ params.thing = this.copyForm.thing ? this.copyForm.thing : ""; upStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("淇敼鎴愬姛"); @@ -301,7 +247,6 @@ case "澶嶅埗妯$増": copyStandardTemplate(params) .then((res) => { - if (res.code == 201) return; this.isShowCopyTem = false; this.submitCopyInfoLoading = false; this.$message.success("澶嶅埗鎴愬姛"); @@ -332,12 +277,11 @@ }) .then(() => { delStandardTemplate({ id: row.id }).then((res) => { - if (res.code == 201) return; this.$message.success("鍒犻櫎鎴愬姛"); this.refreshTable("page"); }); }) - .catch(() => {}); + .catch(() => { }); }, templateWrite(row) { getEditTemplatePreparation({ id: row.id }).then((res) => { @@ -345,7 +289,7 @@ return; } this.row = row; - this.row.thing = res.msg; + this.row.thing = res.data; this.isShow = true; }); }, @@ -361,7 +305,7 @@ .then(() => { this.closed(); }) - .catch(() => {}); + .catch(() => { }); }, closed() { this.loading = true; @@ -406,7 +350,6 @@ thing: JSON.stringify(data), name: luckysheet.getWorkbookName(["name"]), }).then((res) => { - if (res.code == 201) return; this.loading = false; this.$message.success("宸蹭繚瀛�"); this.isShow = false; @@ -431,31 +374,8 @@ <style scoped> .search { - background-color: #fff; - height: 80px; + height: 46px; display: flex; - align-items: center; - position: relative; -} - -.search_thing { - width: 350px; - display: flex; - align-items: center; -} - -.search_label { - width: 90px; - font-size: 14px; - text-align: right; -} - -.search_input { - width: calc(100% - 110px); -} -.btn { - position: absolute; - right: 14px; - top: 20px; + justify-content: space-between; } </style> -- Gitblit v1.9.3