From b7a613ff8501e8e1433f5dd7b6b9773175226716 Mon Sep 17 00:00:00 2001
From: jiminglei <836545853@qq.com>
Date: Wed, 7 Jun 2023 09:02:14 +0800
Subject: [PATCH] 11
---
psdc-ui/src/views/system/device/index.vue | 78 ++++++++++++++++++++++-
1 file changed, 75 insertions(+), 3 deletions(-)
diff --git a/psdc-ui/src/views/system/device/index.vue b/psdc-ui/src/views/system/device/index.vue
index 59feab1..8229e3a 100644
--- a/psdc-ui/src/views/system/device/index.vue
+++ b/psdc-ui/src/views/system/device/index.vue
@@ -27,6 +27,15 @@
v-hasPermi="['system:user:import']"
>导入
+
+ 导出
+
@@ -41,8 +50,24 @@
-
-
+
+
+
+ 点击上传图片
+
+
修改
删除
@@ -62,7 +87,7 @@
- //导入
+
{
// console.log(res)
// })
})
+
/** 筛选处理 */
const data = reactive({
+ url:import.meta.env.VITE_APP_BASE_API + "/system/device/index/daoruDevTuPian",
+ headers: { Authorization: "Bearer " + getToken() },
+ getId:{
+ deviceId:1
+ },
+ fileList1:[],
form:{},
upload:{
// 是否显示弹出层(用户导入)
@@ -267,9 +299,33 @@ const data = reactive({
total:'',
timingList:[],
queryParams: '',
+ queryParams1: {
+ "deviceId": 0,
+ "deviceModel": "温度传感器"
+ },
sceneCode:'',
dateRange:[],
});
+const { queryParams1, form, rules } = toRefs(data);
+function success(response){
+ proxy.$alert("" + response.msg + "
", "上传结果", { dangerouslyUseHTMLString: true });
+}
+function getId(Id){
+ console.log(Id)
+ data.getId.deviceId=Id
+}
+function handleRemove1(file, fileList) {
+ console.log(file, fileList);
+}
+function handlePreview1(file) {
+ console.log(file);
+}
+function handleExceed1(files, fileList) {
+ this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
+}
+function beforeRemove1(file, fileList) {
+ return this.$confirm(`确定移除 ${ file.name }?`);
+}
//改变
function changeSl(){
console.log(data.sceneCode)
@@ -444,6 +500,16 @@ function cancel2() {
data.upload.open = false;
reset();
};
+
+/** 导出按钮操作 */
+function handleExport() {
+ proxy.download("system/device/index/daochuDevs", {
+ ...JSON.stringify({
+ "deviceId": 0,
+ "deviceModel": "温度传感器"
+ }),
+ },`device_${new Date().getTime()}.xlsx`);
+};
/** 新增策略处理 */
const open = ref(false);
const title = ref();
@@ -631,4 +697,10 @@ const { queryParams } = toRefs(data);
::v-deep .el-form-item__content{
//display: flex;
}
+.upload-demo{
+ width: 10px;
+ height: 0px;
+ align-items: center;
+ position: center;
+}
\ No newline at end of file