Merge remote-tracking branch 'origin/master'
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | title: 'æå±è½¦é´', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText', |
| | | width: 220, |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | title: 'æå±è½¦é´', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText', |
| | | width: 220, |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: 'æå±é¨é¨', |
| | | title: 'æå±è½¦é´', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText', |
| | | width: 220, |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æå±é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag :disabled="formDisabled" type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="è¯·éæ©æå±é¨é¨"/> |
| | | <a-form-item label="æå±è½¦é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-select-equipment-production v-model="model.departId" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | import pick from 'lodash.pick' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import JDictSelectTag from "@/components/dict/JDictSelectTag" |
| | | import JSelectEquipmentProduction from '@comp/jeecgbiz/JSelectEquipmentProduction.vue' |
| | | |
| | | export default { |
| | | name: 'ActivitiSignExamineForm', |
| | | components: { |
| | | JSelectEquipmentProduction, |
| | | JFormContainer, |
| | | JDictSelectTag, |
| | | }, |
| | |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | backProductionInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æå±é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag :disabled="formDisabled" type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="è¯·éæ©æå±é¨é¨"/> |
| | | <a-form-item label="æå±è½¦é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-select-equipment-production v-model="model.departId" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | import pick from 'lodash.pick' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import JDictSelectTag from "@/components/dict/JDictSelectTag" |
| | | import JSelectEquipmentProduction from '@comp/jeecgbiz/JSelectEquipmentProduction.vue' |
| | | |
| | | export default { |
| | | name: 'AssignApproveUserForm', |
| | | components: { |
| | | JSelectEquipmentProduction, |
| | | JFormContainer, |
| | | JDictSelectTag, |
| | | }, |
| | |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | backProductionInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item label="æå±é¨é¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="è¯·éæ©æå±é¨é¨"/> |
| | | <a-form-item label="æå±è½¦é´" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <!-- <j-dict-select-tag type="list" v-decorator="['departId']" :trigger-change="true" dictCode="sys_department,depart_name,depart_id" placeholder="è¯·éæ©æå±é¨é¨"/>--> |
| | | <j-select-equipment-production v-model="model.departId" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | import pick from 'lodash.pick' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import JDictSelectTag from "@/components/dict/JDictSelectTag" |
| | | import JSelectProduction from '@comp/jeecgbiz/JSelectProduction.vue' |
| | | import JSelectEquipmentProduction from '@comp/jeecgbiz/JSelectEquipmentProduction.vue' |
| | | |
| | | export default { |
| | | name: 'NcDeviceCharactersForm', |
| | | components: { |
| | | JSelectEquipmentProduction, |
| | | JSelectProduction, |
| | | JFormContainer, |
| | | JDictSelectTag, |
| | | }, |
| | |
| | | }, |
| | | departId: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©é¨é¨åç»!'}, |
| | | { required: true, message: 'è¯·éæ©æå±è½¦é´!'}, |
| | | ] |
| | | }, |
| | | controlSystem: { |
| | |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | backProductionInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: '设å¤åç§°', dataIndex: 'deviceName', align: 'center' }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'deviceNo', align: 'center' }, |
| | | { title: '设å¤åå·', dataIndex: 'deviceModel', align: 'center' }, |
| | | { title: 'æå±é¨é¨', dataIndex: 'departName', align: 'center' }, |
| | | { title: '设å¤åç»', dataIndex: 'groupName', align: 'center' }, |
| | | { title: 'æ§å¶ç³»ç»', dataIndex: 'controlSystem', align: 'center' } |
| | | { title: '设å¤åç§°', dataIndex: 'equipmentName', align: 'center' }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'equipmentId', align: 'center' }, |
| | | { title: '设å¤ç±»å', dataIndex: 'equipmentType', align: 'center' }, |
| | | { title: '设å¤åå·', dataIndex: 'equipmentModel', align: 'center' }, |
| | | { title: 'æå±è½¦é´', dataIndex: 'productionName', align: 'center' }, |
| | | { title: 'æ°æ§ç³»ç»', dataIndex: 'controlSystem', align: 'center' } |
| | | ], |
| | | url: { |
| | | list: '/doc/relative/get/device' |
| | |
| | | <a-col :span="24" > |
| | | <a-form-item label="审æ¹ç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select placeholder="审æ¹ç¶æ"> |
| | | <a-select-option v-if="isAgreed" value="1">åæ</a-select-option> |
| | | <a-select-option v-if="!isAgreed" value="2">æç»</a-select-option> |
| | | <a-select-option v-if="isAgreed" value="2">åæ</a-select-option> |
| | | <a-select-option v-if="!isAgreed" value="3">æç»</a-select-option> |
| | | </a-select> |
| | | <!-- <j-dict-select-tag placeholder="è¯·éæ©å®¡æ¹ç¶æ" style="width:100%" :trigger-change="true" v-decorator="['status', validatorRules.status]" dictCode="dnc_assign_stream_status"/>--> |
| | | </a-form-item> |
| | |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24" v-if="systemType"> |
| | | <a-col :span='24'> |
| | | <a-form-model-item label="ç³»ç»ç±»å" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-radio-group name="radioGroup" v-model="systemValue"> |
| | | <a-radio value="1">DNC</a-radio> |
| | | <a-radio value="2">MDC</a-radio> |
| | | <a-radio value="3">éç¨</a-radio> |
| | | </a-radio-group> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span='12'> |
| | | <a-form-model-item v-if="isDepartType == 0" label="ç³»ç»çæ¬å·" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | driveType: "", |
| | | systemType: "", |
| | | deviceLevel: "", |
| | | deviceCategory: "" |
| | | deviceCategory: "", |
| | | deviceTypeDnc:"", |
| | | deviceTypeMdc:"", |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | uploadLoading:false, |
| | | confirmLoading: false, |
| | | headers:{}, |
| | | systemType:false, |
| | | systemValue:"3", |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL']+"/sys/common/upload", |
| | | userWithDepart: "/mdc/mdcEquipment/equipmentDepartList", // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | |
| | | this.headers = {"X-Access-Token":token} |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName(); |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | getAppPlatformName(){ |
| | | getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res=>{ |
| | | if(res.success){ |
| | | this.systemType = res.result.settingValue === '0'; |
| | | } |
| | | }) |
| | | }, |
| | | queryGroup() { |
| | |
| | | |
| | | // that.userId = record.id; |
| | | // console.log(record) |
| | | if (record.systemValue!=null){ |
| | | this.systemValue=record.systemValue; |
| | | }else { |
| | | this.systemValue="3" |
| | | } |
| | | that.model = Object.assign({}, record); |
| | | // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); |
| | | // this.model = Object.assign({}, record) |
| | | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark','systemVersion','devicePower','controlSystem','saveTableName')) |
| | | 'driveType', 'sortNo', 'remark','systemVersion','devicePower','controlSystem','saveTableName','systemValue')) |
| | | }) |
| | | if(record.hasOwnProperty("id")){ |
| | | // that.getUserRoles(record.id); |
| | |
| | | let obj; |
| | | if(!this.model.id){ |
| | | this.model.id = this.userId; |
| | | this.model.systemValue=this.systemValue; |
| | | obj=addEquipment(this.model); |
| | | }else{ |
| | | this.model.systemValue=this.systemValue; |
| | | obj=editEquipment(this.model,{ |
| | | id: this.model.id |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°åç§°"> |
| | | <a-input placeholder="请è¾å
¥åæ°åç§°" v-model="queryParam.settingName"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <!-- <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('ç³»ç»åæ°è¡¨')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </div> --> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> --> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | <span slot="rowIndex" slot-scope="text, record, index"> |
| | | {{(ipagination.current-1)*ipagination.pageSize+index+1}} |
| | | </span> |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span> |
| | | <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="uploadFile(text)"> |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <!-- <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> --> |
| | | <template> |
| | | <!-- <div v-if="record.settingValue=='OPEN'"> |
| | | <a-switch @click="edit(record)" checked-children="å¼" un-checked-children="å
³" default-checked /> |
| | | </div> |
| | | <div v-else> |
| | | <a-switch @click="edit(record)" checked-children="å¼" un-checked-children="å
³" /> |
| | | </div> --> |
| | | </template> |
| | | </span> |
| | | |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <sysParams-modal ref="modalForm" @ok="modalFormOk"></sysParams-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import SysParamsModal from './modules/SysParamsModal' |
| | | import JDictSelectTag from '../../components/dict/JDictSelectTag.vue' |
| | | |
| | | export default { |
| | | name: "SysParamsList", |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | JDictSelectTag, |
| | | SysParamsModal, |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'ç³»ç»åæ°è¡¨ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | scopedSlots: { customRender: 'rowIndex' } |
| | | }, |
| | | { |
| | | title:'åæ°åç§°', |
| | | align:"center", |
| | | dataIndex: 'settingName' |
| | | }, |
| | | { |
| | | title:'åæ°é®', |
| | | align:"center", |
| | | dataIndex: 'settingKey' |
| | | }, |
| | | { |
| | | title:'åæ°å¼', |
| | | align:"center", |
| | | dataIndex: 'settingValue' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | // fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/system/sysParams/list", |
| | | delete: "/system/sysParams/delete", |
| | | deleteBatch: "/system/sysParams/deleteBatch", |
| | | exportXlsUrl: "/system/sysParams/exportXls", |
| | | importExcelUrl: "system/sysParams/importExcel", |
| | | edit: "/system/sysParams/edit", |
| | | }, |
| | | dictOptions:{}, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | edit(sysParams) { |
| | | if(sysParams.settingValue == "CLOSE"){ |
| | | sysParams.settingValue = "OPEN"; |
| | | }else{ |
| | | sysParams.settingValue = "CLOSE"; |
| | | } |
| | | const that = this; |
| | | httpAction("/system/sysParams/edit",sysParams,'put').then((res)=>{ |
| | | if(res.success){ |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-form-item label="åæ°é®" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input disabled v-decorator="['settingKey']" placeholder="请è¾å
¥åæ°é®"></a-input> |
| | | </a-form-item> |
| | | <a-form-item label="åæ°å¼" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['settingValue']" placeholder="请è¾å
¥åæ°å¼"></a-input> |
| | | </a-form-item> |
| | | <a-form-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-textarea disabled v-decorator="['remark']" rows="4" placeholder="请è¾å
¥å¤æ³¨"/> |
| | | </a-form-item> |
| | | |
| | | </a-form> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | |
| | | export default { |
| | | name: "SysParamsModal", |
| | | components: { |
| | | }, |
| | | data () { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | title:"æä½", |
| | | width:800, |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/system/sysParams/add", |
| | | edit: "/system/sysParams/edit", |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model,'settingKey','settingValue','remark')) |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | console.log("表åæäº¤æ°æ®",formData) |
| | | httpAction(httpurl,formData,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | popupCallback(row){ |
| | | this.form.setFieldsValue(pick(row,'settingKey','settingValue','remark')) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-drawer |
| | | :title="title" |
| | | :width="width" |
| | | placement="right" |
| | | :closable="false" |
| | | @close="close" |
| | | :visible="visible"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | |
| | | <a-form-item label="åæ°é®" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['settingKey']" placeholder="请è¾å
¥åæ°é®"></a-input> |
| | | </a-form-item> |
| | | <a-form-item label="åæ°å¼" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['settingValue']" placeholder="请è¾å
¥åæ°å¼"></a-input> |
| | | </a-form-item> |
| | | <a-form-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input v-decorator="['remark']" placeholder="请è¾å
¥å¤æ³¨"></a-input> |
| | | </a-form-item> |
| | | |
| | | </a-form> |
| | | </a-spin> |
| | | <a-button type="primary" @click="handleOk">ç¡®å®</a-button> |
| | | <a-button type="primary" @click="handleCancel">åæ¶</a-button> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: "SysParamsModal", |
| | | components: { |
| | | }, |
| | | data () { |
| | | return { |
| | | form: this.$form.createForm(this), |
| | | title:"æä½", |
| | | width:800, |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/system/sysParams/add", |
| | | edit: "/system/sysParams/edit", |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit({}); |
| | | }, |
| | | edit (record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model,'settingKey','settingValue','remark')) |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | let formData = Object.assign(this.model, values); |
| | | console.log("表åæäº¤æ°æ®",formData) |
| | | httpAction(httpurl,formData,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | popupCallback(row){ |
| | | this.form.setFieldsValue(pick(row,'settingKey','settingValue','remark')) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 30px; |
| | | margin-bottom: 30px; |
| | | float: right; |
| | | } |
| | | </style> |