1、工作日历管理页面增加表格单条数据删除功能
2、报警号管理页面与对比分析页面中的驱动类型数据不再使用数据字典,而采用调用接口获取数据方式
3、报警号管理页面的新增与编辑弹窗中的是否过滤选项切换器优化
| | |
| | | }); |
| | | return str; |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="控制系统类型"> |
| | | <j-dict-select-tag |
| | | placeholder="请选择控制系统类型" |
| | | <!--<j-dict-select-tag--> |
| | | <!--placeholder="请选择控制系统类型"--> |
| | | <!--v-model="queryParam.driveType"--> |
| | | <!--dictCode="mdc_driveType"--> |
| | | <!--/>--> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | dictCode="mdc_driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="请选择控制系统类型" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | slot-scope="text, record" |
| | | > |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <alarm-manager-modal ref="modalForm" @ok="modalFormOk"></alarm-manager-modal> |
| | | <alarm-manager-form ref="modalFormType" @ok="modalFormOk"></alarm-manager-form> |
| | | <!--<alarm-manager-modal ref="modalForm" @ok="modalFormOk"></alarm-manager-modal>--> |
| | | <alarm-manager-form ref="modalFormType" @ok="modalFormOk" :driveTypeList="driveTypeList" :filterOption="filterOption"></alarm-manager-form> |
| | | <alarm-manager-edit ref="modalFormEdit" @ok="modalFormOk"></alarm-manager-edit> |
| | | </a-card> |
| | | </template> |
| | |
| | | import AlarmManagerEdit from './modules/alarmManager/alarmManagerEdit' |
| | | import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | import { filterObj } from '@/utils/util'; |
| | | import api from '@/api/mdc' |
| | | export default { |
| | | name: 'AlarmManager', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [], |
| | | driveTypeList:[] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$set(this.dictOptions, 'isUse', [{ text: '是', value: '0' }, { text: '否', value: '-1' }]) |
| | | this.getSuperFieldList(); |
| | | this.getDriveTypeByApi() |
| | | }, |
| | | computed: { |
| | | // importExcelUrl: function () { |
| | |
| | | this.$refs.modalFormEdit.edit(record); |
| | | this.$refs.modalFormEdit.title = "编辑"; |
| | | this.$refs.modalFormEdit.disableSubmit = false; |
| | | this.$refs.modalFormEdit.isUse = record.isUse === '1' ? true : false |
| | | }, |
| | | handleAddTRype(){ |
| | | this.$refs.modalFormType.add(); |
| | |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | /** |
| | | * 调用接口获取控制系统类型 |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | /** |
| | | * 联想输入框筛选功能 |
| | | * @param input 输入的内容 |
| | | * @param option 配置 |
| | | * @returns {boolean} 判断是否筛选 |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | |
| | | } |
| | | } |
| | |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | console.log(res) |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | /** |
| | | * 联想输入框筛选功能 |
| | | * @param input |
| | | * @param option |
| | | * @returns {boolean} |
| | | * @param input 输入的内容 |
| | | * @param option 配置 |
| | | * @returns {boolean} 判断是否筛选 |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | |
| | | } |
| | | }, |
| | | handleAdd() { |
| | | console.log(this.$refs.modalForm.edit) |
| | | this.$refs.modalForm.add(this.node) |
| | | this.$refs.modalForm.title = '新增' |
| | | this.$refs.modalForm.disableSubmit = false |
| | |
| | | <a-col :span="24"> |
| | | <a-form-item label="是否过滤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <!--<j-switch v-model="model.isUse"></j-switch>--> |
| | | <a-switch v-model="isUse"/> |
| | | <a-switch v-model="isUse"/> |
| | | <!--<a-radio-group v-model="model.isUse">--> |
| | | <!--<a-radio :value="1">--> |
| | | <!--是--> |
| | |
| | | // required: true, message: '请选择班制!', |
| | | // }], |
| | | // }, |
| | | alarmCode:{ |
| | | rules: [{ |
| | | required: true, message: '请输入报警号!', |
| | | }], |
| | | }, |
| | | alarmContent:{ |
| | | rules: [{ |
| | | required: true, message: '请输入报警内容!', |
| | | }], |
| | | }, |
| | | }, |
| | | url: { |
| | | // add: '/mdc/alarmInfo/add', |
| | |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.isUse=record.isUse===0?true:false |
| | | this.form.setFieldsValue(pick(this.model, 'alarmCode', 'alarmContent','driveType')) |
| | | }) |
| | | }, |
| | |
| | | // that.$message.success("添加成功") |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="报警号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input placeholder="请输入报警号" v-decorator="['alarmCode', validatorRules.alarmCode]"></a-input> |
| | | <a-input placeholder="请输入报警号" v-decorator="['alarmCode', validatorRules.alarmCode]" ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | <!--<a-select v-decorator="['driveType', validatorRules. driveType]" placeholder="请选择驱动类型"--> |
| | | <!--:options="shiftList">--> |
| | | <!--</a-select>--> |
| | | <j-dict-select-tag |
| | | placeholder="请选择驱动类型" |
| | | v-decorator="['driveType', validatorRules.driveType]" |
| | | dictCode="mdc_driveType" |
| | | /> |
| | | <!--<j-dict-select-tag--> |
| | | <!--placeholder="请选择驱动类型"--> |
| | | <!--v-decorator="['driveType', validatorRules.driveType]"--> |
| | | <!--dictCode="mdc_driveType"--> |
| | | <!--/>--> |
| | | <a-auto-complete |
| | | v-decorator="['driveType', validatorRules.driveType]" |
| | | :data-source="driveTypeList" |
| | | placeholder="请选择驱动类型" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="是否过滤" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-switch :default-checked = 'showM' v-decorator="['isUse', validatorRules.isUse]"></a-switch> |
| | | <a-switch :checked="isFilterChecked" v-decorator="['isUse', validatorRules.isUse]" @change="isFilterChange"></a-switch> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!--<a-col :span='24'>--> |
| | |
| | | export default { |
| | | name: 'alarmManagerForm', |
| | | // components: {AlarmManagerEqupment}, |
| | | props: {}, |
| | | props: { |
| | | driveTypeList:{ |
| | | type:Array |
| | | }, |
| | | filterOption:{ |
| | | type:Function |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | showM:true, |
| | | isFilterChecked:true, |
| | | isUse:true, |
| | | title: '', |
| | | visible: false, |
| | |
| | | span: 18 |
| | | } |
| | | }, |
| | | confirmLoading: false, form: this.$form.createForm(this), |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | // driveType:{ |
| | | // rules: [{ |
| | | // required: true, message: '请选择驱动类型!', |
| | | // }], |
| | | // }, |
| | | // isUse:{ |
| | | // rules: [{ |
| | | // required: true, message: !', |
| | | // }], |
| | | // }, |
| | | driveType:{ |
| | | rules: [{ |
| | | required: true, message: '请选择驱动类型!', |
| | | }], |
| | | }, |
| | | alarmCode:{ |
| | | rules: [{ |
| | | required: true, message: '请输入报警号!', |
| | | }], |
| | | }, |
| | | alarmDescription:{ |
| | | alarmContent:{ |
| | | rules: [{ |
| | | required: true, message: '请输入报警内容!', |
| | | }], |
| | |
| | | }, |
| | | add(record) { |
| | | let _this = this |
| | | this.visible = true |
| | | this.isFilterChecked=true |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | // this.initShiftList() |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | |
| | | }) |
| | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | /** |
| | | * 是否过滤切换器change事件 |
| | | * @param checked 切换后的状态 |
| | | */ |
| | | isFilterChange(checked){ |
| | | this.isFilterChecked=checked |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!--</a-col>--> |
| | | <a-col :md="5" :sm="5"> |
| | | <a-form-item label="驱动类型"> |
| | | <j-dict-select-tag placeholder="请选择驱动类型" |
| | | :triggerChange="true" dictCode="mdc_driveType" |
| | | v-model="queryParam.driveType" allow-clear/> |
| | | <!--<j-dict-select-tag placeholder="请选择驱动类型"--> |
| | | <!--:triggerChange="true" dictCode="mdc_driveType"--> |
| | | <!--v-model="queryParam.driveType" allow-clear/>--> |
| | | <a-auto-complete |
| | | v-model="queryParam.driveType" |
| | | :data-source="driveTypeList" |
| | | placeholder="驱动类型" |
| | | :filter-option="filterOption" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="9" :sm="9" :xs="4"> |
| | |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api' |
| | | import api from '@/api/mdc' |
| | | export default { |
| | | name: 'comparativeAnalysismain', |
| | | // mixins: [JeecgListMixin], |
| | |
| | | url: { |
| | | comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis' |
| | | }, |
| | | AnalysisList:{} |
| | | AnalysisList:{}, |
| | | driveTypeList:[] |
| | | } |
| | | }, |
| | | watch:{ |
| | |
| | | this.loading = false |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | /** |
| | | * 调用接口获取控制系统类型 |
| | | */ |
| | | getDriveTypeByApi(){ |
| | | api.getDriveTypeApi().then((res)=>{ |
| | | this.driveTypeList=res.result.map(item=>item.value) |
| | | }) |
| | | }, |
| | | /** |
| | | * 联想输入框筛选功能 |
| | | * @param input 输入的内容 |
| | | * @param option 配置 |
| | | * @returns {boolean} 判断是否筛选 |
| | | */ |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0 |
| | | ); |
| | | }, |
| | | // onChange(value, dateString) { |
| | | // // console.log('Selected Time: ', value); |
| | |
| | | this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD') |
| | | this.queryParam.typeTree = "1"; |
| | | this.loadAnalysis(); |
| | | this.getDriveTypeByApi() |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div style="overflow: auto;width: 100%;margin-top: 20px;height: 569px;"> |
| | | <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" @change="handleTableChange" class="ant-table-striped" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)"> |
| | | <span slot="action" |
| | | slot-scope="text, record"> |
| | | <a-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | <span slot="isDaySpan" slot-scope="text, record"> |
| | | <span v-if="text == 'true'">是</span> |
| | | <span v-if="text == 'false'">否</span> |
| | |
| | | title: '结束休息时间', |
| | | align: 'center', |
| | | dataIndex: 'sleepEndDate' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | checkedList: ['lyl'], |
| | | dataList: [], |
| | | url: { |
| | | list: '/mdc/mdcDeviceCalendar/list' |
| | | list: '/mdc/mdcDeviceCalendar/list', |
| | | delete:'/mdc/mdcDeviceCalendar/delete' |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.queryParam = {} |
| | | this.loadData() |
| | | }, |
| | | |
| | | loadData(arg) { |
| | | this.dataSource = []; |
| | | if(!this.url.list){ |
| | |
| | | this.loadData(); |
| | | }, |
| | | openPage() { |
| | | this.visible = true |
| | | this.onClearSelected() |
| | | this.valueProduct=null |
| | | this.visible = true |
| | | this.dataSource = []; |
| | | this.queryParam = { |
| | | status: this.status |
| | | }; |
| | | |
| | | this.loadData(); |
| | | this.initOptions(); |
| | | this.initGroupOptions() |
| | |
| | | <div class="checkboxgroup"> |
| | | <p>统计参数</p> |
| | | <div class="checkboxgroup_con"> |
| | | |
| | | <a-checkbox-group name="checkboxgroup" :value="option" :options="plainOptions" @change="checkboxOnChange"/> |
| | | </div> |
| | | </div> |
| | |
| | | let equipment = param.equipmentId |
| | | getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => { |
| | | if (res.success) { |
| | | |
| | | let temp = [] |
| | | // debugger |
| | | for (var item of res.result) { |
| | |
| | | if(temp.length>0){ |
| | | that.option = [temp[0].value] |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |