Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
da39bd78
Commit
da39bd78
authored
Sep 11, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tui
parent
66e4fed7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
68 deletions
+79
-68
device-manager-ui/admin/src/views/device/module/distribute/list.vue
...ager-ui/admin/src/views/device/module/distribute/list.vue
+79
-68
No files found.
device-manager-ui/admin/src/views/device/module/distribute/list.vue
View file @
da39bd78
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<el-button
<el-button
slot=
"table-head-left2"
slot=
"table-head-left2"
style=
"margin-left: 10px"
style=
"margin-left: 10px"
...
@@ -11,8 +10,6 @@
...
@@ -11,8 +10,6 @@
@
click=
"cloneAppBySite"
@
click=
"cloneAppBySite"
>
复制资源
>
复制资源
</el-button>
</el-button>
</LayoutTable>
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
...
@@ -33,7 +30,7 @@ export default {
...
@@ -33,7 +30,7 @@ export default {
mixins
:
[
table
],
mixins
:
[
table
],
created
()
{
created
()
{
const
siteid
=
session
.
getSession
(
"
siteid
"
);
const
siteid
=
session
.
getSession
(
"
siteid
"
);
this
.
query
[
"
siteId
"
]
=
siteid
?
siteid
:
1
;
this
.
query
[
"
siteId
"
]
=
siteid
?
siteid
:
1
;
},
},
methods
:
{
methods
:
{
cloneAppBySite
(
row
)
{
cloneAppBySite
(
row
)
{
...
@@ -53,7 +50,7 @@ export default {
...
@@ -53,7 +50,7 @@ export default {
},
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
row
.
siteId
=
session
.
getSession
(
"
siteid
"
)
row
.
siteId
=
session
.
getSession
(
"
siteid
"
);
this
.
$refs
.
dialogform
.
add
(
row
);
this
.
$refs
.
dialogform
.
add
(
row
);
},
},
/** 重写编辑方法 */
/** 重写编辑方法 */
...
@@ -73,12 +70,21 @@ export default {
...
@@ -73,12 +70,21 @@ export default {
});
});
},
},
handleSwitch
(
row
){
handleSwitch
(
row
)
{
this
.
loading
=
true
console
.
log
(
row
);
if
(
row
.
selected
==
1
){
this
.
loading
=
true
;
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
id
:
row
.
id
,
selected
:
0
})
if
(
row
.
selected
==
1
)
{
.
then
(
res
=>
{
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
row
.
selected
=
1
id
:
row
.
id
,
selected
:
0
,
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
row
.
selected
=
0
;
}
// console.log(res);
// this.getData();
// console.log(row)
// console.log(row)
// if (res && res.code && res.code == 1) {
// if (res && res.code && res.code == 1) {
// this.getData();
// this.getData();
...
@@ -87,14 +93,20 @@ export default {
...
@@ -87,14 +93,20 @@ export default {
// this.$message.error(res.msg);
// this.$message.error(res.msg);
// }
// }
})
})
.
catch
(
error
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
}
else
{
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
id
:
row
.
id
,
selected
:
1
,
})
})
}
else
{
.
then
((
res
)
=>
{
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
id
:
row
.
id
,
selected
:
1
})
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
.
then
(
res
=>
{
row
.
selected
=
1
;
row
.
selected
=
0
}
// console.log(row)
// this.getData();
// if (res && res.code && res.code == 1) {
// if (res && res.code && res.code == 1) {
// this.getData();
// this.getData();
// this.loading = false;
// this.loading = false;
...
@@ -102,11 +114,10 @@ export default {
...
@@ -102,11 +114,10 @@ export default {
// this.$message.error(res.msg);
// this.$message.error(res.msg);
// }
// }
})
})
.
catch
(
error
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
})
});
}
}
},
},
distribute
(
row
)
{
distribute
(
row
)
{
...
@@ -131,7 +142,8 @@ export default {
...
@@ -131,7 +142,8 @@ export default {
type
:
"
text
"
,
type
:
"
text
"
,
label
:
"
产品
"
,
label
:
"
产品
"
,
fuzzy
:
true
,
fuzzy
:
true
,
},],
},
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
align
:
"
center
"
,
width
:
60
},
{
type
:
"
selection
"
,
align
:
"
center
"
,
width
:
60
},
{
type
:
"
index
"
,
align
:
"
center
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
align
:
"
center
"
,
label
:
"
序号
"
,
width
:
50
},
...
@@ -155,21 +167,20 @@ export default {
...
@@ -155,21 +167,20 @@ export default {
label
:
"
默认选择
"
,
label
:
"
默认选择
"
,
align
:
"
center
"
,
align
:
"
center
"
,
prop
:
"
selected
"
,
prop
:
"
selected
"
,
formatter
:
row
=>
{
formatter
:
(
row
)
=>
{
return
(
return
(
<
el
-
switch
<
el
-
switch
value
=
{
row
.
selected
+
""
}
value
=
{
row
.
selected
+
""
}
active
-
color
=
"
#13ce66
"
active
-
color
=
"
#13ce66
"
inactive
-
color
=
"
#ff4949
"
inactive
-
color
=
"
#ff4949
"
active
-
value
=
'
1
'
active
-
value
=
"
1
"
inactive
-
value
=
'
0
'
inactive
-
value
=
"
0
"
onChange
=
{()
=>
{
onChange
=
{()
=>
{
this
.
handleSwitch
(
row
);
this
.
handleSwitch
(
row
);
}}
}}
>
><
/el-switch
>
<
/el-switch
>
);
);
}
}
,
},
},
{
{
label
:
"
是否部署
"
,
label
:
"
是否部署
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment