New file |
| | |
| | | <template> |
| | | <transition |
| | | name="dialog-fade" |
| | | @after-enter="afterEnter" |
| | | @after-leave="afterLeave"> |
| | | <div |
| | | v-show="visible" |
| | | class="el-dialog__wrapper else close-on-mousedown" @mousedown.self="handleWrapperClick" @mouseup.self="handleWrapperUpClick"> |
| | | <!-- 此处,添加了两个类名,作为调试时的识别 --> |
| | | |
| | | <!-- 此处将原来组件中的 @click 替换为 @mousedown,如此一来,在遮罩层中 mouseup 时也不会意外触发弹窗的关闭 --> |
| | | <div |
| | | role="dialog" |
| | | :key="key" |
| | | aria-modal="true" |
| | | :aria-label="title || 'dialog'" |
| | | :class="['el-dialog', { 'is-fullscreen': fullscreen, 'el-dialog--center': center }, customClass]" |
| | | ref="dialog" |
| | | :style="style"> |
| | | <div class="el-dialog__header"> |
| | | <slot name="title"> |
| | | <span class="el-dialog__title">{{ title }}</span> |
| | | </slot> |
| | | <button |
| | | type="button" |
| | | class="el-dialog__headerbtn" |
| | | aria-label="Close" |
| | | v-if="showClose" |
| | | @click="handleClose"> |
| | | <i class="el-dialog__close el-icon el-icon-close"></i> |
| | | </button> |
| | | </div> |
| | | <div class="el-dialog__body" v-if="rendered"><slot></slot></div> |
| | | <div class="el-dialog__footer" v-if="$slots.footer"> |
| | | <slot name="footer"></slot> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </transition> |
| | | </template> |
| | | |
| | | <script> |
| | | import Popup from 'element-ui/src/utils/popup'; |
| | | import Migrating from 'element-ui/src/mixins/migrating'; |
| | | import emitter from 'element-ui/src/mixins/emitter'; |
| | | |
| | | export default { |
| | | name: 'ElseDialog', |
| | | |
| | | mixins: [Popup, emitter, Migrating], |
| | | |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | |
| | | modal: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | modalAppendToBody: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | appendToBody: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | |
| | | lockScroll: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | closeOnClickModal: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | closeOnPressEscape: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | showClose: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | width: String, |
| | | |
| | | fullscreen: Boolean, |
| | | |
| | | customClass: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | |
| | | top: { |
| | | type: String, |
| | | default: '15vh' |
| | | }, |
| | | beforeClose: Function, |
| | | center: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | |
| | | destroyOnClose: Boolean |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | closed: false, |
| | | key: 0, |
| | | isClose: false |
| | | }; |
| | | }, |
| | | |
| | | watch: { |
| | | visible(val) { |
| | | if (val) { |
| | | this.closed = false; |
| | | this.$emit('open'); |
| | | this.$el.addEventListener('scroll', this.updatePopper); |
| | | this.$nextTick(() => { |
| | | this.$refs.dialog.scrollTop = 0; |
| | | }); |
| | | if (this.appendToBody) { |
| | | document.body.appendChild(this.$el); |
| | | } |
| | | } else { |
| | | this.$el.removeEventListener('scroll', this.updatePopper); |
| | | if (!this.closed) this.$emit('close'); |
| | | if (this.destroyOnClose) { |
| | | this.$nextTick(() => { |
| | | this.key++; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | style() { |
| | | let style = {}; |
| | | if (!this.fullscreen) { |
| | | style.marginTop = this.top; |
| | | if (this.width) { |
| | | style.width = this.width; |
| | | } |
| | | } |
| | | return style; |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | getMigratingConfig() { |
| | | return { |
| | | props: { |
| | | 'size': 'size is removed.' |
| | | } |
| | | }; |
| | | }, |
| | | handleWrapperClick(e) { |
| | | this.isClose = true |
| | | // if (!this.closeOnClickModal) return; |
| | | // this.handleClose(); |
| | | }, |
| | | handleWrapperUpClick (e) { |
| | | if (!this.closeOnClickModal) return; |
| | | console.log(this.isClose) |
| | | if (!this.isClose) return |
| | | console.log(123) |
| | | this.handleClose(); |
| | | }, |
| | | handleClose() { |
| | | if (typeof this.beforeClose === 'function') { |
| | | this.beforeClose(this.hide); |
| | | } else { |
| | | this.hide(); |
| | | } |
| | | }, |
| | | hide(cancel) { |
| | | if (cancel !== false) { |
| | | this.$emit('update:visible', false); |
| | | this.$emit('close'); |
| | | this.closed = true; |
| | | } |
| | | }, |
| | | updatePopper() { |
| | | this.broadcast('ElSelectDropdown', 'updatePopper'); |
| | | this.broadcast('ElDropdownMenu', 'updatePopper'); |
| | | }, |
| | | afterEnter() { |
| | | this.$emit('opened'); |
| | | }, |
| | | afterLeave() { |
| | | this.isClose = false |
| | | this.$emit('closed'); |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | if (this.visible) { |
| | | this.rendered = true; |
| | | this.open(); |
| | | if (this.appendToBody) { |
| | | document.body.appendChild(this.$el); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | destroyed() { |
| | | // if appendToBody is true, remove DOM node after destroy |
| | | if (this.appendToBody && this.$el && this.$el.parentNode) { |
| | | this.$el.parentNode.removeChild(this.$el); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | |
| | | <!-- 上传提示 --> |
| | | <div class="el-upload__tip" slot="tip" v-if="showTip"> |
| | | 请上传 |
| | |
| | | 的文件 |
| | | </div> |
| | | |
| | | <el-dialog |
| | | <Dialog |
| | | :visible.sync="dialogVisible" |
| | | title="预览" |
| | | width="800" |
| | |
| | | :src="dialogImageUrl" |
| | | style="display: block; max-width: 100%; margin: 0 auto" |
| | | /> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" /> |
| | | </el-tooltip> |
| | | </el-row> |
| | | <el-dialog :title="title" :visible.sync="open" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" append-to-body> |
| | | <el-transfer |
| | | :titles="['显示', '隐藏']" |
| | | v-model="value" |
| | | :data="columns" |
| | | @change="dataChange" |
| | | ></el-transfer> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | import VueMeta from 'vue-meta' |
| | | // 字典数据组件 |
| | | import DictData from '@/components/DictData' |
| | | // 弹出层组件 |
| | | import Dialog from '@/components/Dialog/index' |
| | | |
| | | // 全局方法挂载 |
| | | Vue.prototype.getDicts = getDicts |
| | |
| | | Vue.component('Editor', Editor) |
| | | Vue.component('FileUpload', FileUpload) |
| | | Vue.component('ImageUpload', ImageUpload) |
| | | Vue.component('Dialog', Dialog) |
| | | |
| | | Vue.use(directive) |
| | | Vue.use(plugins) |
| | |
| | | <el-table-column label="厂商代码" align="center" prop="code" /> |
| | | <el-table-column label="联系方式" align="center" prop="phone" /> |
| | | <el-table-column label="邮箱" align="center" prop="mailbox" /> |
| | | <el-table-column label="联系地址" align="center" prop="contactAddress" /> |
| | | <el-table-column label="联系地址" align="center" prop="contactAddress" show-overflow-tooltip /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改厂商对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="厂商名称" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请输入厂商名称" /> |
| | |
| | | <el-form-item label="厂商代码" prop="code"> |
| | | <el-input v-model="form.code" placeholder="请输入厂商代码" /> |
| | | </el-form-item> |
| | | <el-form-item label="联系方式" prop="phone"> |
| | | <el-form-item label="联系方式" prop="phoneNumber"> |
| | | <el-input v-model="form.phone" placeholder="请输入联系方式" /> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱" prop="mailbox"> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.$modal.confirm(`是否确认删除厂商代码为${row.code}的厂商?`).then(() => { |
| | | this.loading = true; |
| | | return delManufacturer(ids); |
| | | }).then(() => { |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改学校对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="学校代码" prop="code"> |
| | | <el-input v-model="form.code" placeholder="请输入学校代码"/> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | created() { |
| | | this.getProvince().then(res => { |
| | | this.provinceList = res |
| | | this.provinceFormList = res |
| | | }) |
| | | this.getList(); |
| | | }, |
| | |
| | | getSchool(id).then(response => { |
| | | this.loading = false; |
| | | this.form = response.data; |
| | | listCity(this.form.provinceCode) |
| | | .then(res => { |
| | | this.cityFormList = res.data |
| | | }) |
| | | this.open = true; |
| | | this.title = "修改学校"; |
| | | }); |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.$modal.confirm(`是否确认删除学校代码为${row.code}的学校?`).then(() => { |
| | | this.loading = true; |
| | | return delSchool(ids); |
| | | }).then(() => { |
| | |
| | | }, |
| | | // 查询条件省份改变 |
| | | provinceQueryChange(v) { |
| | | this.queryParams.cityCode = undefined |
| | | this.getCity(v).then(res => { |
| | | this.cityList = res |
| | | }) |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改测试单表对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="部门id" prop="deptId"> |
| | | <el-input v-model="form.deptId" placeholder="请输入部门id" /> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 用户导入对话框 --> |
| | | <el-dialog :title="upload.title" :close-on-click-modal="false" :visible.sync="upload.open" width="400px" append-to-body> |
| | | <Dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除测试单表编号为"' + ids + '"的数据项?').then(() => { |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.loading = true; |
| | | return delDemo(ids); |
| | | }).then(() => { |
| | |
| | | </el-table> |
| | | |
| | | <!-- 添加或修改测试树表对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="父id" prop="parentId"> |
| | | <treeselect v-model="form.parentId" :options="treeOptions" :normalizer="normalizer" placeholder="请选择父id" /> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | this.$modal.confirm('是否确认删除测试树表编号为"' + row.id + '"的数据项?').then(() => { |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.loading = true; |
| | | return delTree(row.id); |
| | | }).then(() => { |
| | |
| | | <span>{{ parseTime(scope.row.arrivalDate, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="批次说明" align="center" prop="illustrate" /> |
| | | <el-table-column label="批次说明" align="center" prop="illustrate" show-overflow-tooltip /> |
| | | <el-table-column label="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改生产批次对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="生产批次" prop="batch"> |
| | | <el-input v-model="form.batch" placeholder="请输入生产批次" /> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.$modal.confirm(`是否确认删除生产批次为"${row.batch}"的生产批次?`).then(() => { |
| | | this.loading = true; |
| | | return delBatch(ids); |
| | | }).then(() => { |
| | |
| | | {{formatZero(scope.row.serialNumber, 4)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="设备类型" align="center" prop="type"> |
| | | <el-table-column label="设备类型" min-width="120" align="center" prop="type"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.DICT101" :value="scope.row.type"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="硬件序列码" align="center" prop="sequenceCode"/> |
| | | <el-table-column label="软件版本" align="center" prop="edition"/> |
| | | <el-table-column label="学校名称" align="center" prop="schoolId_dictText"/> |
| | | <el-table-column label="主机ID" align="center" prop="hostId"/> |
| | | <el-table-column label="硬件序列码" min-width="120" align="center" prop="sequenceCode" show-overflow-tooltip/> |
| | | <el-table-column label="软件版本" align="center" min-width="120" prop="edition" show-overflow-tooltip/> |
| | | <el-table-column label="学校名称" align="center" prop="schoolId_dictText" show-overflow-tooltip/> |
| | | <el-table-column label="主机ID" align="center" min-width="120" prop="hostId"/> |
| | | <el-table-column label="β网络ID" align="center" prop="networkId"/> |
| | | <el-table-column label="β工作频段" align="center" prop="frequencyBand"> |
| | | <template slot-scope="scope"> |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改智控设备对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="50%" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="序列号" prop="serialNumber"> |
| | | <el-form-item label="序列号11" prop="serialNumber"> |
| | | <el-input v-model="form.serialNumber" :disabled="disabled" placeholder="请输入序列号"/> |
| | | </el-form-item> |
| | | <el-form-item label="设备类型" prop="type"> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删?').then(() => { |
| | | this.$modal.confirm(`是否确认删序列号为${this.formatZero(row.serialNumber, 4)}的指控设备?`).then(() => { |
| | | this.loading = true; |
| | | return delEquipment(ids); |
| | | }).then(() => { |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除设备联机日志编号为"' + ids + '"的数据项?').then(() => { |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.loading = true; |
| | | return delEquipmentLog(ids); |
| | | }).then(() => { |
| | |
| | | <span>{{ scope.$index + (queryParams.pageNum - 1) * queryParams.pageSize + 1 }} </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="外设代码" align="center" prop="code"/> |
| | | <el-table-column label="外设名称" align="center" prop="name"/> |
| | | <el-table-column label="规格型号" align="center" prop="model"/> |
| | | <el-table-column label="外设代码" width="80" align="center" prop="code"/> |
| | | <el-table-column label="外设名称" align="center" prop="name" show-overflow-tooltip/> |
| | | <el-table-column label="规格型号" align="center" prop="model" min-width="120"/> |
| | | <el-table-column label="生产厂商" align="center" prop="manufacturer_dictText"/> |
| | | <el-table-column label="厂商代码" align="center" prop="vendorCode_dictText"/> |
| | | <el-table-column label="波特率" align="center" prop="baudRate"> |
| | | <el-table-column label="厂商代码" width="100" align="center" prop="vendorCode_dictText"/> |
| | | <el-table-column label="波特率" width="100" align="center" prop="baudRate"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.DICT103" :value="scope.row.baudRate"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="读数指令" align="center" width="180" prop="readInstruction"/> |
| | | <el-table-column label="回数长度" align="center" prop="loopLength"/> |
| | | <el-table-column label="功能描述" align="center" min-width="180" show-overflow-tooltip prop="description"/> |
| | | <el-table-column label="问询指令" align="center" width="180" prop="readInstruction"/> |
| | | <el-table-column label="返回长度" width="80" align="center" prop="loopLength"/> |
| | | <el-table-column label="功能描述" align="center" min-width="300" show-overflow-tooltip prop="description"/> |
| | | <el-table-column label="操作" align="center" fixed="right" width="240" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改外设单元对话框 --> |
| | | <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="50%" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="外设代码" prop="code"> |
| | | <el-input v-model="form.code" placeholder="请输入外设代码" :disabled="disabled"/> |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="读数指令" prop="readInstruction"> |
| | | <el-input v-model="form.readInstruction" placeholder="请输入读数指令" :disabled="disabled"/> |
| | | <el-form-item label="问询指令" prop="readInstruction"> |
| | | <el-input v-model="form.readInstruction" placeholder="请输入问询指令" :disabled="disabled"/> |
| | | </el-form-item> |
| | | <el-form-item label="回数长度" prop="loopLength"> |
| | | <el-input v-model="form.loopLength" placeholder="请输入回数长度" :disabled="disabled"/> |
| | | <el-form-item label="返回长度" prop="loopLength"> |
| | | <el-input v-model="form.loopLength" placeholder="请输入返回长度" :disabled="disabled"/> |
| | | </el-form-item> |
| | | <el-form-item label="功能描述" prop="description"> |
| | | <el-input v-model="form.description" type="textarea" placeholder="请输入内容" :disabled="disabled"/> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | |
| | | <!-- 附件窗体 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="uploadFlag" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="uploadFlag" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="附件"> |
| | | <fileUpload v-model="form.filePath" limit="1"/> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | callback(new Error('最多输入32个字符')); |
| | | return |
| | | } |
| | | if (!(/^[A-Za-z]+$/.test(value))) { |
| | | callback(new Error('只能输入英文字符')); |
| | | return |
| | | } |
| | | // if (!(/^[A-Za-z]+$/.test(value))) { |
| | | // callback(new Error('只能输入英文字符')); |
| | | // return |
| | | // } |
| | | callback(); |
| | | }; |
| | | return { |
| | |
| | | {required: true, message: "波特率不能为空", trigger: "change"} |
| | | ], |
| | | readInstruction: [ |
| | | {required: true, message: "读数指令不能为空", trigger: "blur"}, |
| | | {required: true, message: "问询指令不能为空", trigger: "blur"}, |
| | | {max: 128, message: '最多输入128个字符', trigger: 'blur' } |
| | | ], |
| | | loopLength: [ |
| | | {required: true, message: "回数长度不能为空", trigger: "blur"} |
| | | {required: true, message: "返回长度不能为空", trigger: "blur"} |
| | | ], |
| | | filePath: [ |
| | | {required: true, message: "附件不能为空", trigger: "blur"} |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.$modal.confirm(`是否确认删除外设代码为${row.code}的外设单元?`).then(() => { |
| | | this.loading = true; |
| | | return delPeripheralUnit(ids); |
| | | }).then(() => { |
| | |
| | | <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="访问编号" align="center" prop="infoId" /> |
| | | <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" /> |
| | | <el-table-column label="用户名称" align="center" min-width="120" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" /> |
| | | <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" /> |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const infoIds = row.infoId || this.ids; |
| | | this.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delLogininfor(infoIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | /> |
| | | |
| | | <!-- 操作日志详细 --> |
| | | <el-dialog title="操作日志详细" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body> |
| | | <Dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body> |
| | | <el-form ref="form" :model="form" label-width="100px" size="mini"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="open = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const operIds = row.operId || this.ids; |
| | | this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delOperlog(operIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改参数配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="参数名称" prop="configName"> |
| | | <el-input v-model="form.configName" placeholder="请输入参数名称" /> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const configIds = row.configId || this.ids; |
| | | this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delConfig(configIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="leaderName" label="主负责人" width="200"></el-table-column> |
| | | <el-table-column prop="leaderAssistantName" label="副负责人" width="200"></el-table-column> |
| | | <el-table-column prop="remarks" label="机构职能" width="200"></el-table-column> |
| | | <el-table-column prop="remarks" label="机构职能" width="200" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="200"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | |
| | | </el-table> |
| | | |
| | | <!-- 添加或修改部门对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="600px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="600px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="24" v-if="form.parentId !== 0"> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | |
| | | <!--机构成员--> |
| | | <el-drawer |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改参数配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="字典类型"> |
| | | <el-input v-model="form.dictType" :disabled="true" /> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改参数配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="字典名称" prop="dictName"> |
| | | <el-input v-model="form.dictName" placeholder="请输入字典名称" /> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | </el-table> |
| | | |
| | | <!-- 添加或修改菜单对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="680px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="680px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改公告对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="780px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="780px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const noticeIds = row.noticeId || this.ids |
| | | this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delNotice(noticeIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改对象存储配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="配置key" prop="configKey"> |
| | | <el-select v-model="form.configKey" placeholder="请选择配置key"> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ossConfigIds = row.ossConfigId || this.ids; |
| | | this.$modal.confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?').then(() => { |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.loading = true; |
| | | return delOssConfig(ossConfigIds); |
| | | }).then(() => { |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改OSS对象存储对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="文件名"> |
| | | <fileUpload v-model="form.file" v-if="type === 0"/> |
| | |
| | | <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ossIds = row.ossId || this.ids; |
| | | this.$modal.confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?').then(() => { |
| | | this.$modal.confirm('是否确认删除?').then(() => { |
| | | this.loading = true; |
| | | return delOss(ossIds); |
| | | }).then(() => { |
| | |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | class="del-btn" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:post:remove']" |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改岗位对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="岗位名称" prop="postName"> |
| | | <el-input v-model="form.postName" placeholder="请输入岗位名称" /> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const postIds = row.postId || this.ids; |
| | | this.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delPost(postIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改角色配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="角色名称" prop="roleName"> |
| | | <el-input v-model="form.roleName" placeholder="请输入角色名称" /> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | |
| | | <!-- 分配角色数据权限对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="openDataScope" width="500px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body> |
| | | <el-form :model="form" label-width="80px"> |
| | | <el-form-item label="角色名称"> |
| | | <el-input v-model="form.roleName" :disabled="true" /> |
| | |
| | | <el-button type="primary" @click="submitDataScope">确 定</el-button> |
| | | <el-button @click="cancelDataScope">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <!-- 授权用户 --> |
| | | <el-dialog title="选择用户" :close-on-click-modal="false" :visible.sync="visible" width="800px" top="5vh" append-to-body> |
| | | <Dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true"> |
| | | <el-form-item label="用户名称" prop="userName"> |
| | | <el-input |
| | |
| | | <el-button type="primary" @click="handleSelectUser">确 定</el-button> |
| | | <el-button @click="visible = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | </el-row> |
| | | |
| | | <!-- 添加或修改用户配置对话框 --> |
| | | <el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="600px" append-to-body> |
| | | <Dialog :title="title" :visible.sync="open" width="600px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | |
| | | <!-- 用户导入对话框 --> |
| | | <el-dialog :title="upload.title" :close-on-click-modal="false" :visible.sync="upload.open" width="400px" append-to-body> |
| | | <Dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <div> |
| | | <div class="user-info-head" :close-on-click-modal="false" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog"> |
| | | <Dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog"> |
| | | <el-row> |
| | | <el-col :xs="24" :md="12" :style="{height: '350px'}"> |
| | | <vue-cropper |
| | |
| | | <el-button type="primary" size="small" @click="uploadImg()">提 交</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-dialog> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <!-- 预览界面 --> |
| | | <el-dialog :title="preview.title" :close-on-click-modal="false" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar"> |
| | | <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar"> |
| | | <el-tabs v-model="preview.activeName"> |
| | | <el-tab-pane |
| | | v-for="(value, key) in preview.data" |
| | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const tableIds = row.tableId || this.ids; |
| | | this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function() { |
| | | this.$modal.confirm('是否确认删除?').then(function() { |
| | | return delTable(tableIds); |
| | | }).then(() => { |
| | | this.getList(); |