1000110007_edit.jsp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <div id="space-content">
  6. <div class="space-form-infor" style="overflow-x: hidden;">
  7. <el-form action='@service{name:`department_change_submit`, page:`toTips`, params:`{departmentid:"${department.departmentid}"}` }@' method="post" :model="obj" :rules="appRules" ref="obj" label-width="100px">
  8. <el-form-item label="所属单位" prop="unitid">
  9. <el-input clearable v-model="unitName" :disabled="true" ></el-input>
  10. </el-form-item>
  11. <el-form-item label="名称" prop="name">
  12. <el-input clearable v-model="obj.name"></el-input>
  13. </el-form-item>
  14. <el-form-item label="上级部门" prop="parentDepartmentid">
  15. <el-cascader v-model="obj.parentDepartmentid" :props="{ emitPath: false, checkStrictly: true }" :options="departmentOptions" placeholder="请选择" clearable style="width:100%"></el-cascader>
  16. </el-form-item>
  17. <el-form-item label="负责人" prop="person">
  18. <space-select v-model="obj.person" predefine="person" datasize="50" ></space-select>
  19. </el-form-item>
  20. <el-form-item label="部门职责" prop="describe">
  21. <space-editor v-model="obj.describe" height="220px" placeholder="请输入部门职责" ref="editor"></space-editor>
  22. </el-form-item>
  23. </el-form>
  24. </div>
  25. <div class="space-form-btn">
  26. <el-button type="primary" icon="el-icon-circle-check" :loading="loading" onclick="space.forms.submit();">保存</el-button>
  27. <el-button type="warning" v-if="disable" icon="el-icon-warning-outline" onclick='@service{ name:`department_status_submit`, params:`{departmentid: "${department.departmentid}", dcode: "71"}`, page:`toTips`, type:`confirm`, msg: `是否确定停用?`, refresh:`true` }@'>停用</el-button>
  28. <el-button type="success" v-if="enable" icon="el-icon-warning-outline" onclick='@service{ name:`department_status_submit`, params:`{departmentid: "${department.departmentid}", dcode: "61"}`, page:`toTips`, type:`confirm`, msg: `是否确定启用?`, refresh:`true` }@'>启用</el-button>
  29. <el-button type="danger" icon="el-icon-delete" onclick='@service{ name:`department_status_submit`, params:`{departmentid: "${department.departmentid}", dcode: "72"}`, page:`toTips`, type:`confirm`, msg: `是否确定删除?`, refresh:`true` }@' >删除</el-button>
  30. <el-button icon="el-icon-circle-close" onclick="space.allFunction.closeDialog();">关闭</el-button>
  31. </div>
  32. </div>
  33. </body>
  34. <script type="text/javascript">
  35. space.vue = new Vue({
  36. el: space.appContent,
  37. data() {
  38. return {
  39. obj: {
  40. name: '${department.name}',
  41. parentDepartmentid: space.utils.parseInt('${department.parentDepartmentid}'),
  42. describe: `<app:getHtmlContent filePath="${department.describe}" />`,
  43. // 负责人
  44. person: []
  45. },
  46. unitName: '<app:codeBookTranslate name="unit" filter="{ `unitid`: `${department.unitid }`}" />',
  47. appRules: {
  48. name: space.rules.required({
  49. label: '名称'
  50. })
  51. },
  52. departmentOptions: undefined,
  53. superiorAry: [],
  54. disable: space.utils.dataStatus.disable("${department.dcode}"),
  55. enable: space.utils.dataStatus.enable("${department.dcode}"),
  56. loading: false
  57. };
  58. },
  59. created: function() {
  60. this.initDepartmentOption();
  61. // 初始化负责人
  62. var _this = this;
  63. space.utils.ajax({
  64. url: '@service{ name:`departmentChargeManage`, params:`{departmentid: "${departmentid}"}` }@',
  65. dataType: 'json',
  66. callback: function(data) {
  67. _this.obj.person = space.utils.parseAry(data.data.personIds);
  68. }
  69. });
  70. },
  71. methods: {
  72. /**
  73. * 初始化部门列表
  74. */
  75. initDepartmentOption: function() {
  76. var unitid = '${department.unitid}';
  77. if (!unitid) {
  78. return;
  79. }
  80. var _this = this;
  81. space.utils.ajax({
  82. url: '@service{ name:`unit_department_list_api`, params:`{filter: "${department.departmentid}"}` }@',
  83. data: {
  84. "unitid" : unitid
  85. },
  86. dataType: 'json',
  87. callback: function(data) {
  88. _this.departmentOptions = data.data;
  89. }
  90. })
  91. }
  92. }
  93. })
  94. $(document).ready(function() {
  95. space.forms.verify();
  96. })
  97. </script>
  98. </html>