|
@@ -1,70 +1,114 @@
|
|
|
<template>
|
|
<template>
|
|
|
-<ContentWrap>
|
|
|
|
|
- <!-- 顶部标题-->
|
|
|
|
|
- <div class="topTitle">
|
|
|
|
|
- <span class="tab-title">执行计划:{{route.query.sopName}}</span>
|
|
|
|
|
- <div class="set-btn" @click="goBack">
|
|
|
|
|
- <img src="../../../assets/images/返回.png" alt="" />
|
|
|
|
|
- 返回
|
|
|
|
|
|
|
+ <ContentWrap>
|
|
|
|
|
+ <!-- 顶部标题-->
|
|
|
|
|
+ <div class="topTitle">
|
|
|
|
|
+ <span class="tab-title">执行计划:{{ route.query.sopName }}</span>
|
|
|
|
|
+ <div class="set-btn" @click="goBack">
|
|
|
|
|
+ <img src="../../../assets/images/返回.png" alt="" />
|
|
|
|
|
+ 返回
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
-</ContentWrap>
|
|
|
|
|
|
|
+ </ContentWrap>
|
|
|
|
|
|
|
|
-<!-- <ContentWrap>-->
|
|
|
|
|
-<!-- <div class="tab-header">-->
|
|
|
|
|
-<!-- <span class="tab-title">通知设置</span>-->
|
|
|
|
|
-<!-- </div>-->
|
|
|
|
|
-<!-- <div class="noticeContent">-->
|
|
|
|
|
-<!-- <p>启用通知:-->
|
|
|
|
|
-<!-- <el-switch-->
|
|
|
|
|
-<!-- v-model="NotificationStatus"-->
|
|
|
|
|
-<!-- size="small"-->
|
|
|
|
|
-<!-- :active-value="0"-->
|
|
|
|
|
-<!-- :inactive-value="1"-->
|
|
|
|
|
-<!-- /></p>-->
|
|
|
|
|
-<!-- <section>-->
|
|
|
|
|
-<!-- <el-button-->
|
|
|
|
|
-<!-- type="primary"-->
|
|
|
|
|
-<!-- plain-->
|
|
|
|
|
-<!-- @click="openForm('create')"-->
|
|
|
|
|
-<!-- v-hasPermi="['iscs:sop:create']"-->
|
|
|
|
|
-<!-- >-->
|
|
|
|
|
-<!-- <Icon icon="ep:plus" class="mr-5px" />-->
|
|
|
|
|
-<!-- 新增-->
|
|
|
|
|
-<!-- </el-button>-->
|
|
|
|
|
-<!-- <el-button-->
|
|
|
|
|
-<!-- type="danger"-->
|
|
|
|
|
-<!-- plain-->
|
|
|
|
|
-<!-- :disabled="multiple"-->
|
|
|
|
|
-<!-- @click="handleDelete()"-->
|
|
|
|
|
-<!-- v-hasPermi="['iscs:sop:delete']"-->
|
|
|
|
|
-<!-- >-->
|
|
|
|
|
-<!-- <Icon icon="ep:delete" class="mr-5px" />-->
|
|
|
|
|
-<!-- 批量删除-->
|
|
|
|
|
-<!-- </el-button>-->
|
|
|
|
|
-<!-- </section>-->
|
|
|
|
|
-
|
|
|
|
|
-<!-- </div>-->
|
|
|
|
|
-<!-- </ContentWrap>-->
|
|
|
|
|
|
|
+ <ContentWrap>
|
|
|
|
|
+ <div class="tab-header">
|
|
|
|
|
+ <span class="tab-title">通知设置</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="noticeContent">
|
|
|
|
|
+ <p
|
|
|
|
|
+ >启用通知:
|
|
|
|
|
+ <el-switch
|
|
|
|
|
+ v-model="NotificationStatus"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :active-value="0"
|
|
|
|
|
+ :inactive-value="1"
|
|
|
|
|
+ />
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <section class="noticebtn">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ plain
|
|
|
|
|
+ @click="openForm('create')"
|
|
|
|
|
+ v-hasPermi="['iscs:sop:create']"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Icon icon="ep:plus" class="mr-5px" />
|
|
|
|
|
+ 新增
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ plain
|
|
|
|
|
+ :disabled="multiple"
|
|
|
|
|
+ @click="handleDelete()"
|
|
|
|
|
+ v-hasPermi="['iscs:sop:delete']"
|
|
|
|
|
+ >
|
|
|
|
|
+ <Icon icon="ep:delete" class="mr-5px" />
|
|
|
|
|
+ 批量删除
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ border
|
|
|
|
|
+ :data="noticeList"
|
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-table-column type="selection" width="50" align="center" fixed />
|
|
|
|
|
+ <el-table-column label="规则" prop="machineryName" align="center" width="200" />
|
|
|
|
|
+ <el-table-column label="通知规则种类" prop="machineryName" align="center" width="200" />
|
|
|
|
|
+ <el-table-column label="通知时间" prop="machineryName" align="center" width="200" />
|
|
|
|
|
+ <el-table-column label="通知区域" prop="machineryName" align="center" width="200" />
|
|
|
|
|
+ <el-table-column label="通知角色与通知模板" prop="machineryName" align="center" min-width="200" />
|
|
|
|
|
+
|
|
|
|
|
+<!-- <el-table-column label="启用通知" align="center" width="100">-->
|
|
|
|
|
+<!-- <template #default="scope">-->
|
|
|
|
|
+<!-- <el-switch-->
|
|
|
|
|
+<!-- :model-value="scope.row.enableNotifications"-->
|
|
|
|
|
+<!-- :active-value="1"-->
|
|
|
|
|
+<!-- :inactive-value="0"-->
|
|
|
|
|
+<!-- @update:modelValue="(val) => handleNotificationsChange(scope.row, val)"-->
|
|
|
|
|
+<!-- />-->
|
|
|
|
|
+<!-- </template>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="550" fixed="right">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ link
|
|
|
|
|
+ :icon="Edit"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="openForm('update', row.id)"
|
|
|
|
|
+ v-hasPermi="['iscs:sop:update']"
|
|
|
|
|
+ >
|
|
|
|
|
+ 修改
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </ContentWrap>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-
|
|
|
|
|
|
|
+import { Edit } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
-const NotificationStatus=ref('')
|
|
|
|
|
|
|
+const NotificationStatus = ref('')
|
|
|
const ids = ref<number[]>([]) // 选中的数据
|
|
const ids = ref<number[]>([]) // 选中的数据
|
|
|
const multiple = ref(true) // 非多个禁用
|
|
const multiple = ref(true) // 非多个禁用
|
|
|
-
|
|
|
|
|
|
|
+const noticeList=ref([])
|
|
|
|
|
+const loading = ref(false) // 列表的加载中
|
|
|
// 返回
|
|
// 返回
|
|
|
const goBack = () => {
|
|
const goBack = () => {
|
|
|
router.push('/sopm/sop')
|
|
router.push('/sopm/sop')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 添加/修改/查看操作 */
|
|
/** 添加/修改/查看操作 */
|
|
|
-const openForm =(type:string)=>{
|
|
|
|
|
- if(type=='create'){
|
|
|
|
|
|
|
+const openForm = (type: string) => {
|
|
|
|
|
+ if (type == 'create') {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ name: 'NotificationUpdate',
|
|
|
|
|
+ // query: { id: id, type: 'create' }
|
|
|
|
|
+ })
|
|
|
console.log('新增了')
|
|
console.log('新增了')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -88,18 +132,14 @@ const handleSelectionChange = (selection: any[]) => {
|
|
|
ids.value = selection.map((item) => item.id)
|
|
ids.value = selection.map((item) => item.id)
|
|
|
multiple.value = !selection.length
|
|
multiple.value = !selection.length
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
.topTitle {
|
|
.topTitle {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.set-btn {
|
|
.set-btn {
|
|
|
width: 60px;
|
|
width: 60px;
|
|
|
height: 30px;
|
|
height: 30px;
|
|
@@ -123,10 +163,17 @@ const handleSelectionChange = (selection: any[]) => {
|
|
|
padding: 12px 20px;
|
|
padding: 12px 20px;
|
|
|
border-radius: 4px 4px 0 0;
|
|
border-radius: 4px 4px 0 0;
|
|
|
}
|
|
}
|
|
|
-.noticeContent{
|
|
|
|
|
|
|
+
|
|
|
|
|
+.noticeContent {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
padding: 10px 30px;
|
|
padding: 10px 30px;
|
|
|
- background: blue;
|
|
|
|
|
|
|
+ //background: blue;
|
|
|
|
|
+ .noticebtn {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ line-height: 60px;
|
|
|
|
|
+ margin: 10px 0;
|
|
|
|
|
+ //background: green;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|