Bläddra i källkod

更改要是日记权限问题

sunyanqiang 2 år sedan
förälder
incheckning
57e94b3306

+ 6 - 13
src/views/grassrootsregistration/bdgldiary/index.vue

@@ -254,9 +254,9 @@
                 @change="btn"
               >
                 <el-option
-                  :label="item.name"
                   v-for="(item, i) in renYuan"
                   :key="i"
+                  :label="item.name"
                   :value="item"
                   class="input_xiala"
                 >
@@ -362,8 +362,7 @@
                 cellspacing="0"
                 align="center"
                 border="1"
-                style="
-                  border-bottom: white;
+                style="border-bottom: white;
                   border-collapse: collapse;
                   mso-border-left-alt: 0.5pt solid windowtext;
                   mso-border-top-alt: 0.5pt solid windowtext;
@@ -1683,17 +1682,17 @@ export default {
     // 单位选择触发
     selectPeo(data) {
       this.chongZhi();
+      this.form.unitId = data.id;
+      this.getRenYuan(this.form.unitId);
       // 获取当前时间
       if (this.statustimer) {
       } else {
         this.getTimes();
       }
-      this.form.unitId = data.id;
       // 获取实力情况
       this.form.deptId = data.id;
       this.getShiLiRen(this.form.deptId);
-      this.getRenYuan(this.form.unitId);
-      this.getShou(this.form.unitId);
+      this.getShous(this.form.unitId);
       // this.getTimes();
       // 判断是否全部选择
       if (this.form.unitId !== null && this.form.blogDate) {
@@ -1707,12 +1706,6 @@ export default {
       });
     },
     // 获取首长
-    getShou(id) {
-      getUser(id).then((res) => {
-        this.shouZhang = res.data;
-      });
-    },
-    // 修改里获取首长
     getShous(id) {
       getUsers(id).then((res) => {
         this.shouZhang = res.data;
@@ -1870,7 +1863,7 @@ export default {
       this.form.unitId = this.dw.deptId;
       this.getShiLiRen(this.form.deptId);
       this.getRenYuan(this.form.unitId);
-      this.getShou(this.form.unitId);
+      this.getShous(this.form.unitId);
       this.getTimes();
       // 判断是否全部选择
       if (this.form.unitId !== null && this.form.blogDate) {

+ 389 - 0
src/views/grassrootsregistration/ipaddressconfig/index.vue

@@ -0,0 +1,389 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label="" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入名称"
+          clearable
+          @input="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="" prop="ip">
+        <el-input
+          v-model="queryParams.ip"
+          placeholder="请输入ip地址"
+          clearable
+          @input="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" size="btr" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['grassrootsregistration:ipaddressconfig:add']"
+          >新增</el-button
+        >
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['grassrootsregistration:ipaddressconfig:edit']"
+          >修改</el-button
+        >
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['grassrootsregistration:ipaddressconfig:remove']"
+          >删除</el-button
+        >
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['grassrootsregistration:ipaddressconfig:export']"
+          >导出</el-button
+        >
+      </el-col> -->
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="ipaddressconfigList"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#003c69', color: 'white' }"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" prop="id">
+        <template scope="scope">
+          <span>{{
+            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="名称" align="center" prop="name" />
+      <el-table-column label="ip地址" align="center" prop="ip" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="btu"
+            type="text"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['grassrootsregistration:ipaddressconfig:edit']"
+            >修改</el-button
+          >
+          <el-button
+            size="btd"
+            type="text"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['grassrootsregistration:ipaddressconfig:remove']"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改获取考勤记录的IP地址配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="80px"
+        inline
+        :close-on-click-modal="false"
+      >
+        <el-form-item label="名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入名称" />
+        </el-form-item>
+        <el-form-item label="ip地址" prop="ip">
+          <el-input v-model="form.ip" placeholder="请输入ip地址" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel" size="btn">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listIpaddressconfig,
+  getIpaddressconfig,
+  delIpaddressconfig,
+  addIpaddressconfig,
+  updateIpaddressconfig,
+} from "@/api/grassrootsregistration/ipaddressconfig";
+
+export default {
+  name: "Ipaddressconfig",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 获取考勤记录的IP地址配置表格数据
+      ipaddressconfigList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        ip: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询获取考勤记录的IP地址配置列表 */
+    getList() {
+      this.loading = true;
+      listIpaddressconfig(this.queryParams).then((response) => {
+        this.ipaddressconfigList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        ip: null,
+        createTime: null,
+        updateTime: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加获取考勤记录的IP地址配置";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getIpaddressconfig(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改获取考勤记录的IP地址配置";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateIpaddressconfig(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addIpaddressconfig(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm(
+          '是否确认删除获取考勤记录的IP地址配置编号为"' + ids + '"的数据项?'
+        )
+        .then(function () {
+          return delIpaddressconfig(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "grassrootsregistration/ipaddressconfig/export",
+        {
+          ...this.queryParams,
+        },
+        `ipaddressconfig_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
+};
+</script>
+<style scoped>
+/* 对话框背景颜色 */
+::v-deep .el-dialog {
+  background: #004d86 !important;
+}
+::v-deep .el-textarea__inner {
+  width: 884px;
+  height: 104px;
+}
+::v-deep .el-dialog__header {
+  border-bottom: 1px solid #718a9d;
+}
+::v-deep .el-dialog__title {
+  color: #fff;
+  font: 18px;
+}
+::v-deep .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+::v-deep .el-form-item__label {
+  font: 16px;
+  color: #fff;
+  width: 100px !important;
+}
+::v-deep .el-input__inner {
+  background: transparent;
+  color: #fff;
+  border: 1px solid white !important;
+  border-color: #fff !important;
+}
+
+/* 调整表单间距 */
+::v-deep .el-form-item__content {
+  width: 200px;
+}
+::v-deep .el-dialog__body {
+  box-sizing: border-box;
+  padding: 30px 0px 30px 63px;
+}
+.contents {
+  padding: 0px 40px !important;
+}
+/* 下拉菜单字体/背景颜色 */
+.el-select-dropdown__item.hover,
+.el-select-dropdown__item:hover {
+  background-color: #196299;
+  color: #111;
+}
+.el-select-dropdown__item {
+  color: #111;
+}
+
+/* 分页按钮 */
+::v-deep .el-pagination.is-background .el-pager li {
+  background-color: #004d86;
+  color: #fff;
+}
+::v-deep .el-pagination.is-background .btn-next {
+  background-color: #004d86;
+  color: #fff;
+}
+::v-deep .el-input__inner {
+  cursor: pointer !important;
+}
+
+/* 调整输入框提示文字颜色 */
+::v-deep .vue-treeselect__placeholder {
+  color: #bdbdbd4f !important;
+}
+::v-deep input::-webkit-input-placeholder {
+  color: #bdbdbd4f !important;
+}
+::v-deep input:-moz-placeholder {
+  color: #bdbdbd4f !important;
+}
+/* 底部确定取消按钮 */
+::v-deep .el-dialog__footer {
+  margin-right: 119px;
+}
+</style>

+ 1 - 0
src/views/peopleChuRu/bdglLeave/index.vue

@@ -349,6 +349,7 @@
             v-hasPermi="['peopleChuRu:bdglLeave:edit']"
             >审批</el-button
           >
+          
           <el-button
             v-else-if="scope.row.common == '2'"
             size="mini"