Browse Source

lixg8-12

pull/1/head
lxg 1 year ago
parent
commit
bd6a092194
  1. 2
      index.html
  2. 6
      package.json
  3. 10
      src/views/model/devicemodel/editModel.vue
  4. 31
      src/views/model/devicemodel/index.vue

2
index.html

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico"> <link rel="icon" href="/favicon.ico">
<title>闻荫管理系统</title> <title>联美运营系统</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style> <style>
html, html,

6
package.json

@ -1,8 +1,8 @@
{ {
"name": "wenyin", "name": "lianmei",
"version": "3.8.5", "version": "3.8.5",
"description": "闻荫管理系统", "description": "联美运营系统",
"author": "闻荫", "author": "联美",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

10
src/views/model/devicemodel/editModel.vue

@ -159,7 +159,7 @@
} }
} }
</style> </style>
<script setup name="newdevicemodel"> <script setup name="editdevicemodel">
import { listDevicemodel,addDevicemodel, updateDevicemodel } from "@/api/model/devicemodel"; import { listDevicemodel,addDevicemodel, updateDevicemodel } from "@/api/model/devicemodel";
import { listParamclass } from "@/api/model/paramclass"; import { listParamclass } from "@/api/model/paramclass";
import { listModelType} from "@/api/model/modelType"; import { listModelType} from "@/api/model/modelType";
@ -186,9 +186,9 @@ const updateModelSubmit = ref([]);
const operateModelIds = ref([]); const operateModelIds = ref([]);
const updateModelIds = ref([]); const updateModelIds = ref([]);
const deleteModelIds = ref([]); const deleteModelIds = ref([]);
console.log(router); console.log(deleteModelIds);
console.log(proxy); console.log(proxy);
const tempPid = router.currentRoute._value.query.pid; const modelId = router.currentRoute._value.query.pid;
const data = reactive({ const data = reactive({
form: { form: {
sort:1, sort:1,
@ -353,8 +353,8 @@ function submitForm() {
}); });
} }
onMounted(() => { onMounted(() => {
debugger
console.log("-------------"+tempPid); console.log("-------------"+modelId);
// //
// //
// form.value.pid=tempPid; // form.value.pid=tempPid;

31
src/views/model/devicemodel/index.vue

@ -264,7 +264,6 @@ function getTreeselect() {
devicemodelOptions.value.push(data); devicemodelOptions.value.push(data);
}); });
} }
// //
function cancel() { function cancel() {
open.value = false; open.value = false;
@ -342,19 +341,27 @@ function toggleExpandAll() {
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
async function handleUpdate(row) { function handleUpdate(row) {
reset(); const path = "/editdevicemodel"
await getTreeselect(); router.push({
if (row != null) { name: path,
form.value.pid = row.id; query: { pid: row.id }
} })
getDevicemodel(row.id).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改设备模型信息";
});
} }
// async function handleUpdate(row) {
// reset();
// await getTreeselect();
// if (row != null) {
// form.value.pid = row.id;
// }
// getDevicemodel(row.id).then(response => {
// form.value = response.data;
// open.value = true;
// title.value = "";
// });
// }
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
proxy.$refs["devicemodelRef"].validate(valid => { proxy.$refs["devicemodelRef"].validate(valid => {

Loading…
Cancel
Save