| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工序编码" prop="process"> |
| | | <el-select v-model="queryParams.process" placeholder="请选择工序编码" clearable> |
| | | <!-- <el-option--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.label"--> |
| | | <!-- :value="dict.value"--> |
| | | <!-- />--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" prop="processName"> |
| | | <el-input |
| | | v-model="queryParams.processName" |
| | | placeholder="请输入工序名称" |
| | | v-model="queryParams.process" |
| | | placeholder="请输入工序编码" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="state"> |
| | | <el-select v-model="queryParams.state" placeholder="请选择状态" clearable> |
| | | <el-select v-model="queryParams.state" placeholder="请选择状态" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['main:opcuaconfig:add']" |
| | | v-hasPermi="['da:opcuaconfig:add']" |
| | | >新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['main:opcuaconfig:edit']" |
| | | v-hasPermi="['da:opcuaconfig:edit']" |
| | | >修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['main:opcuaconfig:remove']" |
| | | v-hasPermi="['da:opcuaconfig:remove']" |
| | | >删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | <el-table border v-loading="loading" :data="opcuaconfigList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <!-- <el-table-column label="ID" align="center" prop="id" />--> |
| | | <el-table-column label="工序编码" align="center" prop="process"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="工序名称" align="center" prop="processName"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.processName"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="节点" align="center" prop="node"> |
| | | <el-table-column label="工序编码" align="center" prop="process"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="交互节点" align="center" prop="node"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.node"/>--> |
| | | <!-- </template>--> |
| | |
| | | <dict-tag :options="dict.type.subscription_type" :value="scope.row.rFunction"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" align="center" prop="remarks"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="状态" align="center" prop="state"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" align="center" prop="remarks"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | |
| | | style="width: 72px" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['da:opcuaconfig:edit']" |
| | | v-hasPermi="['main:opcuaconfig:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | |
| | | {{titleName}} |
| | | </span> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="节点" prop="node"> |
| | | <el-form-item label="交互节点" prop="node"> |
| | | <el-input v-model="form.node" placeholder="请输入节点" /> |
| | | </el-form-item> |
| | | <el-form-item label="数据类型" prop="sysTypes"> |
| | |
| | | v-for="dict in dict.type.sys_yes_no" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="parseInt(dict.value)" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="工序名称" prop="processName">--> |
| | | <!-- <el-input v-model="form.processName" placeholder="请输入工序名称" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="工序编码" prop="process">--> |
| | | <!-- <el-input v-model="form.process" placeholder="请输入工序编码" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="工序编码" prop="process"> |
| | | <el-radio-group v-model="form.process"> |
| | | <!-- <el-radio--> |
| | | <!-- v-for="dict in dict.type.${dictType}"--> |
| | | <!-- :key="dict.value"--> |
| | | <!-- :label="dict.value"--> |
| | | <!-- >{{dict.label}}</el-radio>--> |
| | | </el-radio-group> |
| | | <el-select style="width: 100%" @change="handleSelectChange(form.process)" v-model="form.process" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.processesCode" |
| | | :label="item.processesCode" |
| | | :value="item.processesCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" prop="processName"> |
| | | <el-input v-model="form.processName" placeholder="请输入工序名称" /> |
| | | <el-input disabled v-model="form.processName" placeholder="请输入工序名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="state"> |
| | | <el-select v-model="form.state" placeholder="请选择状态"> |
| | |
| | | :value="parseInt(dict.value)" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | |
| | | <script> |
| | | import { listOpcuaconfig, getOpcuaconfig, delOpcuaconfig, addOpcuaconfig, updateOpcuaconfig } from "@/api/main/da/opcuaconfig/opcuaconfig"; |
| | | import {listProcesses} from "@/api/main/bs/processes/processes"; |
| | | |
| | | export default { |
| | | name: "Opcuaconfig", |
| | | dicts: ['subscription_type', 'sys_yes_no', 'sys_normal_disable', 'data_type'], |
| | | dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | options: [], |
| | | // 遮罩层 |
| | | loading: true, |
| | | titleName: "", |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | node: null, |
| | | sysTypes: null, |
| | | rFunction: null, |
| | | process: null, |
| | | processName: null, |
| | | state: null |
| | | }, |
| | | ProcessesqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | process: null, |
| | | processName: null, |
| | | keyProcessesFlag: null, |
| | | routeCode: undefined, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | id: [ |
| | | { required: true, message: "ID不能为空", trigger: "blur" } |
| | | ], |
| | | node: [ |
| | | { required: true, message: "节点不能为空", trigger: "blur" } |
| | | ], |
| | | sysTypes: [ |
| | | { required: true, message: "数据类型不能为空", trigger: "change" } |
| | | ], |
| | | subscribe: [ |
| | | { required: true, message: "是否订阅不能为空", trigger: "change" } |
| | | ], |
| | | rFunction: [ |
| | | { required: true, message: "订阅类型不能为空", trigger: "change" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getProcessesList(); |
| | | |
| | | }, |
| | | methods: { |
| | | /** 查询工序信息列表 */ |
| | | getProcessesList() { |
| | | this.loading = true; |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | handleSelectChange(selectedOption) { |
| | | this.ProcessesqueryParams.process = selectedOption; |
| | | listProcesses(this.ProcessesqueryParams).then(response => { |
| | | this.form.processName = response.rows[0].processesName; |
| | | }); |
| | | }, |
| | | /** 查询交互信号配置列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | module: null, |
| | | node: null, |
| | | length: null, |
| | | sysTypes: null, |
| | | functionality: null, |
| | | subscribe: null, |
| | | rModule: null, |
| | | rFunction: null, |
| | | remarks: null, |
| | | process: null, |
| | | processName: null, |
| | | process: null, |
| | | state: null |
| | | }; |
| | | this.resetForm("form"); |