|
@@ -132,7 +132,7 @@
|
|
|
>导出处室汇总</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-hasPermi="['offcial:weekly:yl ']"
|
|
|
+ v-hasPermi="['offcial:weekly:yl']"
|
|
|
type="success"
|
|
|
plain
|
|
|
icon="view"
|
|
@@ -164,23 +164,27 @@
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
+ <template #default="scope" >
|
|
|
+ <el-button v-if="userId==scope.row.userId"
|
|
|
link
|
|
|
type="primary"
|
|
|
icon="Edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['offcial:weekly:edit']"
|
|
|
- >修改</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
+ >修改</el-button >
|
|
|
+ <el-button v-if="userId==scope.row.userId"
|
|
|
link
|
|
|
type="primary"
|
|
|
icon="Delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['offcial:weekly:remove']"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button >
|
|
|
+ <el-button v-else
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ icon="view"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ >查看</el-button >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -203,7 +207,7 @@
|
|
|
label-width="80px"
|
|
|
>
|
|
|
<!-- <el-form-item label="周数" prop="periods">
|
|
|
-
|
|
|
+
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="周数">
|
|
|
<el-input disabled v-model="form1.periods" />
|
|
@@ -225,7 +229,7 @@
|
|
|
<el-input disabled v-model="form.deptName" placeholder="" />
|
|
|
</el-form-item>
|
|
|
<el-divider content-position="center">周报事务信息</el-divider>
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="!form.userId||userId==form.userId">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button type="primary" icon="Plus" @click="handleAddYwWeeklyItem"
|
|
|
>添加</el-button
|
|
@@ -339,7 +343,7 @@
|
|
|
</el-table-column> -->
|
|
|
</el-table>
|
|
|
</el-form>
|
|
|
- <template #footer>
|
|
|
+ <template #footer v-if="!form.userId||userId==form.userId">
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -400,7 +404,6 @@ import { Base64 } from "js-base64";
|
|
|
import moment from "moment"; //导入文件
|
|
|
import { init } from "echarts";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-
|
|
|
const weeklyList = ref([]);
|
|
|
const gridData = ref([]);
|
|
|
const ywWeeklyItemList = ref([]);
|
|
@@ -420,6 +423,7 @@ const title = ref("");
|
|
|
const weekNum = ref(null);
|
|
|
const selectionValue = ref(null);
|
|
|
const rowValue = ref(null);
|
|
|
+const userId = ref(null);
|
|
|
const dateRange = ref("");
|
|
|
const { sys_yes_no, zb_type } = proxy.useDict("sys_yes_no", "zb_type");
|
|
|
const data = reactive({
|
|
@@ -458,13 +462,19 @@ function handleView() {
|
|
|
);
|
|
|
});
|
|
|
}
|
|
|
+huoquUserId()
|
|
|
+function huoquUserId(){
|
|
|
+ getInfo().then((res) => {
|
|
|
+ userId.value=res.user.userId
|
|
|
+ });
|
|
|
+}
|
|
|
function handleJinzhanYwWeeklyItem() {
|
|
|
myselfDb({ orderByColumn: "createTime", isAsc: "Desc" }).then((res) => {
|
|
|
if (res.rows.length > 0) {
|
|
|
dialogTableVisible.value = true;
|
|
|
gridData.value = res.rows;
|
|
|
} else {
|
|
|
- proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
+ // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -476,7 +486,7 @@ function addThing(row) {
|
|
|
dialogTableVisible.value = true;
|
|
|
gridData.value = res.rows;
|
|
|
} else {
|
|
|
- proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
+ // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -676,7 +686,7 @@ function handleAdd() {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
+ // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -694,6 +704,19 @@ function handleUpdate(row) {
|
|
|
title.value = "修改周报";
|
|
|
});
|
|
|
}
|
|
|
+/** 修改按钮操作 */
|
|
|
+function selWeek(row) {
|
|
|
+ reset();
|
|
|
+ const _id = row.id || ids.value;
|
|
|
+ getWeekly(_id).then((response) => {
|
|
|
+ form1.value.periods = Number(response.data.periods) + "周";
|
|
|
+ console.log("form1.value.periods", form1.value.periods);
|
|
|
+ form.value = response.data;
|
|
|
+ ywWeeklyItemList.value = response.data.ywWeeklyItemList;
|
|
|
+ open.value = true;
|
|
|
+ title.value = "查看周报";
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
function submitForm() {
|