From 330375a684720f1801424028d4f592477b6d73d9 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期二, 07 十一月 2023 10:11:33 +0800 Subject: [PATCH] 提交 workshop --- src/views/eam/depart/modules/TeamModal.vue | 341 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 341 insertions(+), 0 deletions(-) diff --git a/src/views/eam/depart/modules/TeamModal.vue b/src/views/eam/depart/modules/TeamModal.vue new file mode 100644 index 0000000..fb4616e --- /dev/null +++ b/src/views/eam/depart/modules/TeamModal.vue @@ -0,0 +1,341 @@ +<template> + <a-modal + :title="title" + :width="1600" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="鍗曟嵁鍙�"> + <j-input + placeholder="璇疯緭鍏ュ崟鎹彿妫�绱�" + v-model="queryParam.num" + ></j-input> + </a-form-item> + </a-col> + + <a-col + :md="6" + :sm="8" + > + <a-form-item label="璁惧鍚嶇О"> + <j-input + placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" + v-model="queryParam.equipmentName" + ></j-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + style="margin-left:8px;" + >閲嶇疆</a-button> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + + </a-col> + </a-row> + </a-form> + </div> + <div style="margin-top:8px;"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="confirmLoading" + @change="handleTableChange" + :customRow="clickThenCheck" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + > + <span slot="faultDescription" slot-scope="text"> + <j-ellipsis :value="text" :length="10" /> + </span> + </a-table> + </div> + </a-form> + </a-spin> + + </a-modal> +</template> + +<script> + +import { postAction, getAction } from '@/api/manage' +import JDate from '@/components/jeecg/JDate' +import Tooltip from 'ant-design-vue/es/tooltip' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 +import store from '@/store' + +export default { + name: "FaultReportRepair", + mixins: [JeecgListMixin], + components: { + JDate, + Tooltip, + JEllipsis, + store + }, + props:{ + mainId:{ + type:String, + required:false, + default:"", + } + }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + if(!this.mainId){ + this.clearList() + }else{ + this.queryParam['noEqId'] = val + this.loadData(1); + } + } + } + }, + data() { + return { + title: "閫夋嫨鏁呴殰鎶ヤ慨淇℃伅", + visible: false, + model: {}, + dataSource: [], + disableSubmit: false, + type: "radio", + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title:'鐝粍缂栫爜', + align:"center", + dataIndex: 'num', + width:100 + }, + { + title:'鐝粍鍚嶇О', + align:"center", + dataIndex: 'name', + width:100 + }, + { + title:'鍒涘缓浜�', + align:"center", + dataIndex: 'createBy', + width:100, + }, + { + title:'鍒涘缓鏃ユ湡', + align:"center", + dataIndex: 'createTime', + width:100, + }, + { + title:'鏇存柊浜�', + align:"center", + dataIndex: 'updateBy', + width:100, + }, + { + title:'鏇存柊鏃ユ湡', + align:"center", + dataIndex: 'updateTime', + width:100, + }, + ], + url: { + list: "/base/team/list", + add: "/eam/repairOrder/addBySelectReport" + }, + } + }, + methods: { + searchQuery() { + this.loadData(1); + }, + searchReset() { + this.queryParam = {}; + this.loadData(1) + }, + clickThenCheck(record) { + return { + on: { + click: (e) => { + this.selectedRowRecord = record; + this.onSelectChange(record.id.split(","), [record]); + } + } + }; + }, + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + }, + close() { + this.queryParam = {}; + this.$emit('close'); + this.visible = false; + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.confirmLoading=true; + if (that.selectedRowKeys.length === 0) { + that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨鍗曞悗鎻愪氦锛�") + return false; + } + postAction(this.url.add,this.selectionRows).then(res=>{ + if(res.success){ + that.$message.success("棰嗗彇鎴愬姛锛�") + that.$emit('ok'); + }else{ + that.$message.error("棰嗗彇鍑虹幇寮傚父锛�") + } + }).finally(res=>{ + that.confirmLoading = false; + that.close(); + }); + }, + handleCancel() { + this.close(); + }, + clearList(){ + this.dataSource=[] + this.selectedRowKeys=[] + this.ipagination.current = 1 + }, + }, +} +</script> +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +.fontweight { + font-weight: bold; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +.ant-table-tbody .ant-table-row td { + padding-top: 10px; + padding-bottom: 10px; +} + +.anty-row-operator button { + margin: 0 5px; +} + +.ant-btn-danger { + background-color: #ffffff; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + .notshow { + display: none; +} + +.frozenRowClass { + color: #c9c9c9; +} +.hight { + color: #f5222d; +} +.middle { + color: #fa8c16; +} +.low { + color: #52c41a; +} +.dataUnKnow { + color: #1890ff; +} .frozenRowClass { + color: #c9c9c9; +} +</style> \ No newline at end of file -- Gitblit v1.9.3