jiangping
2025-04-15 71c893964b732f2026fccc573502a1b503f985fd
代码初始化
已修改14个文件
109 ■■■■ 文件已修改
admin/src/components/base/BaseOpera.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaCategoryDcaProblemWindow.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaCategoryWindow.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/plugins/messagebox.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryDbhLocaltion.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryDbhType.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryDcaLocaltion.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryDcaProblem.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categorySheLocaltion.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categorySheType.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/workorderShe.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/service/common/EmailService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/base/BaseOpera.vue
@@ -1,4 +1,6 @@
<script>
import { memberSync } from '@/api/business/member'
export default {
  name: 'BaseOpera',
  data () {
@@ -76,11 +78,20 @@
        }
        // 调用新建接口
        this.isWorking = true
        var that = this
        this.api.create(this.form)
          .then(() => {
            this.visible = false
            this.$tip.apiSuccess('新建成功')
            this.$emit('success')
            // that.$tip.apiSuccess('新建成功')
            that.$dialog.actionConfirmButton('是否停留该页面继续新建数据?', '新建成功','继续添加','关闭返回')
              .then(() => {
                that.$refs.form.resetFields()
                that.form[this.configData['field.id']] = null
                that.$emit('success')
              })
              .catch(() => {
                that.visible = false
                that.$emit('success')
              })
          })
          .catch(e => {
            this.$tip.apiFailed(e)
admin/src/components/business/OperaCategoryDcaProblemWindow.vue
@@ -67,6 +67,7 @@
  },
  methods: {
    handleChangeCategory (value) {
      this.form.parentId = null
      if (this.form.categoryList && this.form.categoryList.length >= 1) {
        this.form.parentId = this.form.categoryList[this.form.categoryList.length - 1]
      }
admin/src/components/business/OperaCategoryWindow.vue
@@ -18,7 +18,7 @@
        </el-cascader>
      </el-form-item>
      <el-form-item label="排序码" prop="sortnum">
        <el-input v-model="form.sortnum" placeholder="请输入排序码(升序)" v-trim/>
        <el-input v-model="form.sortnum" type="number" placeholder="请输入排序码(升序)" v-trim/>
      </el-form-item>
      <el-form-item label="备注" prop="remark">
        <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" v-trim/>
@@ -67,6 +67,7 @@
  },
  methods: {
    handleChangeCategory (value) {
      this.form.parentId = null
      if (this.form.categoryList && this.form.categoryList.length >= 1) {
        this.form.parentId = this.form.categoryList[this.form.categoryList.length - 1]
      }
admin/src/plugins/messagebox.js
@@ -66,4 +66,11 @@
      type: 'warning'
    })
  },
  actionConfirmButton (message, title,confirmButtonText,cancelButtonText) {
    return MessageBox.confirm(message, title, {
      confirmButtonText: confirmButtonText || '确认',
      cancelButtonText: cancelButtonText ||'取消',
      type: 'warning'
    })
  }
}
admin/src/views/business/categoryDbhLocaltion.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">显示全部</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -34,6 +34,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column>
        <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
@@ -91,6 +92,12 @@
    this.getfindTreePage()
  },
  methods: {
    refresh () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = null
      this.getfindTreePage()
      this.handlePageChange()
    },
    handlePageChangeDo () {
      this.searchForm.isRoot = 1
      this.searchForm.parentId = null
admin/src/views/business/categoryDbhType.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">显示全部</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -34,6 +34,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column>
        <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
@@ -91,6 +92,12 @@
    this.getfindTreePage()
  },
  methods: {
    refresh () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = null
      this.getfindTreePage()
      this.handlePageChange()
    },
    handlePageChangeDo () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = 1
admin/src/views/business/categoryDcaLocaltion.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">显示全部</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -34,6 +34,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column>
        <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
@@ -91,6 +92,12 @@
    this.getfindTreePage()
  },
  methods: {
    refresh () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = null
      this.getfindTreePage()
      this.handlePageChange()
    },
    handlePageChangeDo () {
      this.searchForm.isRoot = 1
      this.searchForm.parentId = null
admin/src/views/business/categoryDcaProblem.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">一级主题</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -44,7 +44,7 @@
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
        <el-table-column fixed="right" v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="120">
          <template slot-scope="{row}">
            <el-button type="text" icon="el-icon-edit" @click="$refs.operaCategoryWindow.open('编辑DCA主题和观察项', row, categoryList,row.type)"  v-permissions="['business:category:update']">编辑</el-button>
            <el-button type="text" icon="el-icon-delete" @click="deleteById(row,true, getfindTreePage)" style="color: red"  v-permissions="['business:category:delete']">删除</el-button>
@@ -72,7 +72,7 @@
  data () {
    return {
      TreeList: [],
      level: 1,
      level: 0,
      // 搜索
      searchForm: {
        name: '',
admin/src/views/business/categorySheLocaltion.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">显示全部</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -34,6 +34,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column>
        <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
@@ -91,6 +92,12 @@
    this.getfindTreePage()
  },
  methods: {
    refresh () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = null
      this.getfindTreePage()
      this.handlePageChange()
    },
    handlePageChangeDo () {
      this.searchForm.isRoot = 1
      this.searchForm.parentId = null
admin/src/views/business/categorySheType.vue
@@ -8,7 +8,7 @@
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
          <el-button type="primary" @click="refresh">显示顶层</el-button>
          <el-button type="primary" @click="refresh">显示全部</el-button>
          <el-button @click="reset">重置</el-button>
        </section>
      </el-form>
@@ -34,6 +34,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="parentName" label="父级" min-width="150px"></el-table-column>
        <el-table-column prop="namePath" label="完整路径" min-width="150px"></el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="最后操作时间" min-width="150px"></el-table-column>
        <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete' ])" label="操作" min-width="280">
@@ -91,6 +92,12 @@
    this.getfindTreePage()
  },
  methods: {
    refresh () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = null
      this.getfindTreePage()
      this.handlePageChange()
    },
    handlePageChangeDo () {
      this.searchForm.parentId = null
      this.searchForm.isRoot = 1
admin/src/views/business/workorderShe.vue
@@ -40,7 +40,7 @@
            <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE事件工单详情', row)" >{{ row.code || '-'}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="typeName" label="伤害类型" min-width="100px"></el-table-column>
        <el-table-column prop="typeNamePath" label="伤害类型" min-width="100px"></el-table-column>
        <el-table-column prop="submitDate" label="上报时间" min-width="150px"></el-table-column>
        <el-table-column prop="status" label="状态" min-width="100px">
          <template slot-scope="{row}">
server/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java
@@ -123,6 +123,9 @@
        if( category.getId() == null){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(Constants.equalsInteger(category.getId(),category.getParentId())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,父级不能设置为自身!");
        }
        category.setType(null);//类型不支持修改
        Category model = categoryMapper.selectById(category.getId());
        if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)) {
@@ -136,6 +139,8 @@
                .eq(Category::getIsdeleted,Constants.ZERO)) >0){
            throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "对不起,名称不能重复~");
        }*/
        String oldIdPath = model.getIdPath();
        String oldNamePath = model.getNamePath();
        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        category.setIdPath(category.getId()+"/");//名称路径
        category.setNamePath(category.getName());//名称路径
@@ -150,7 +155,25 @@
        }
        category.setEditDate(new Date());
        category.setEditor(user.getId());
        categoryMapper.updateById(category);
        categoryMapper.update(null,new UpdateWrapper<Category>().lambda()
                        .eq(Category::getId,category.getId())
                        .set(Category::getEditDate,category.getEditDate())
                        .set(Category::getEditor,category.getEditor())
                        .set(Category::getName,category.getName())
                        .set(Category::getParentId,category.getParentId())
                        .set(Category::getSortnum,category.getSortnum())
                        .set(Category::getRemark,category.getRemark())
                        .set(Category::getNamePath,category.getNamePath())
                        .set(Category::getIdPath,category.getId())
        );
        //修改全部下级的编码和名称路径
        categoryMapper.update(null,new UpdateWrapper<Category>().lambda()
                .likeRight(Category::getIdPath,oldIdPath)
                .set(Category::getEditDate,category.getEditDate())
                .set(Category::getEditor,category.getEditor())
                .setSql("id_path=replace(id_path,'"+oldIdPath+"','"+category.getIdParentPath()+"')")
                .setSql("name_path=replace(name_path,'"+oldNamePath+"/','"+category.getName()+"/')")
        );
    }
    @Override
server/src/main/java/com/doumee/service/business/impl/WorkorderServiceImpl.java
@@ -549,6 +549,7 @@
                .selectAs(Member::getPhone,Workorder::getMemberPhone)
                .select(" c2.name ",Workorder::getCategoryName)
                .select(" c3.name ",Workorder::getTypeName)
                .select(" c3.name_path ",Workorder::getTypeNamePath)
                .leftJoin(Member.class,Member::getId,Workorder::getMemberId)
                .leftJoin(" category c3 on  t.TYPE_ID = c3.id   ") //风险类型
                .leftJoin(" category c2 on  t.CATEGORY_ID = c2.id   ") //DCA一级问题编码
server/src/main/java/com/doumee/service/common/EmailService.java
@@ -63,7 +63,7 @@
                    content += "<div style='display:block;'> ";
                    for (String f : imgList){
                        // 设置附件
                        content += "<img style='width:200px;margin:5px' src='"+f+"'/>";
                        content += "<a href='"+f+"' target='blank'><img style='width:200px;margin:5px' src='"+f+"'/></a>";
                    }
                }
            content += "</div></body><html>";