| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <html>
- <head>
-
- </head>
- <body>
- <div id="space-content">
-
- <div class="space-form-infor" style="overflow-x: hidden;">
- <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">
-
- <el-form-item label="所属单位" prop="unitid">
- <el-input clearable v-model="unitName" :disabled="true" ></el-input>
- </el-form-item>
- <el-form-item label="名称" prop="name">
- <el-input clearable v-model="obj.name"></el-input>
- </el-form-item>
- <el-form-item label="上级部门" prop="parentDepartmentid">
- <el-cascader v-model="obj.parentDepartmentid" :props="{ emitPath: false, checkStrictly: true }" :options="departmentOptions" placeholder="请选择" clearable style="width:100%"></el-cascader>
- </el-form-item>
- <el-form-item label="负责人" prop="person">
- <space-select v-model="obj.person" predefine="person" datasize="50" ></space-select>
- </el-form-item>
- <el-form-item label="部门职责" prop="describe">
- <space-editor v-model="obj.describe" height="220px" placeholder="请输入部门职责" ref="editor"></space-editor>
- </el-form-item>
- </el-form>
- </div>
- <div class="space-form-btn">
- <el-button type="primary" icon="el-icon-circle-check" :loading="loading" onclick="space.forms.submit();">保存</el-button>
- <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>
- <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>
- <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>
- <el-button icon="el-icon-circle-close" onclick="space.allFunction.closeDialog();">关闭</el-button>
- </div>
- </div>
- </body>
- <script type="text/javascript">
-
- space.vue = new Vue({
- el: space.appContent,
- data() {
- return {
- obj: {
- name: '${department.name}',
- parentDepartmentid: space.utils.parseInt('${department.parentDepartmentid}'),
- describe: `<app:getHtmlContent filePath="${department.describe}" />`,
- // 负责人
- person: []
- },
- unitName: '<app:codeBookTranslate name="unit" filter="{ `unitid`: `${department.unitid }`}" />',
- appRules: {
- name: space.rules.required({
- label: '名称'
- })
- },
- departmentOptions: undefined,
- superiorAry: [],
- disable: space.utils.dataStatus.disable("${department.dcode}"),
- enable: space.utils.dataStatus.enable("${department.dcode}"),
- loading: false
- };
- },
- created: function() {
- this.initDepartmentOption();
- // 初始化负责人
- var _this = this;
- space.utils.ajax({
- url: '@service{ name:`departmentChargeManage`, params:`{departmentid: "${departmentid}"}` }@',
- dataType: 'json',
- callback: function(data) {
- _this.obj.person = space.utils.parseAry(data.data.personIds);
- }
- });
- },
- methods: {
- /**
- * 初始化部门列表
- */
- initDepartmentOption: function() {
- var unitid = '${department.unitid}';
- if (!unitid) {
- return;
- }
- var _this = this;
- space.utils.ajax({
- url: '@service{ name:`unit_department_list_api`, params:`{filter: "${department.departmentid}"}` }@',
- data: {
- "unitid" : unitid
- },
- dataType: 'json',
- callback: function(data) {
- _this.departmentOptions = data.data;
- }
- })
- }
- }
- })
- $(document).ready(function() {
- space.forms.verify();
- })
- </script>
- </html>
|